summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/ec/src/ec-common.c')
-rw-r--r--xlators/cluster/ec/src/ec-common.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c
index da67dbc0f95..ef43a30ac6e 100644
--- a/xlators/cluster/ec/src/ec-common.c
+++ b/xlators/cluster/ec/src/ec-common.c
@@ -1021,8 +1021,6 @@ void ec_get_size_version(ec_lock_link_t *link)
ec_inode_t *ctx;
ec_fop_data_t *fop;
dict_t *dict = NULL;
- uid_t uid;
- gid_t gid;
int32_t error = -ENOMEM;
gf_boolean_t getting_size;
uint64_t allzero[EC_VERSION_SIZE] = {0, 0};
@@ -1045,9 +1043,6 @@ void ec_get_size_version(ec_lock_link_t *link)
return;
}
- uid = fop->frame->root->uid;
- gid = fop->frame->root->gid;
-
memset(&loc, 0, sizeof(loc));
LOCK(&lock->loc.inode->lock);
@@ -1132,8 +1127,8 @@ void ec_get_size_version(ec_lock_link_t *link)
error = 0;
out:
- fop->frame->root->uid = uid;
- fop->frame->root->gid = gid;
+ fop->frame->root->uid = fop->uid;
+ fop->frame->root->gid = fop->gid;
loc_wipe(&loc);
@@ -1759,8 +1754,6 @@ ec_update_size_version(ec_lock_link_t *link, uint64_t *version,
ec_lock_t *lock;
ec_inode_t *ctx;
dict_t * dict;
- uid_t uid;
- gid_t gid;
int32_t err = -ENOMEM;
fop = link->fop;
@@ -1816,9 +1809,6 @@ ec_update_size_version(ec_lock_link_t *link, uint64_t *version,
ec_dict_set_number(dict, EC_XATTR_CONFIG, 0);
}
- uid = fop->frame->root->uid;
- gid = fop->frame->root->gid;
-
fop->frame->root->uid = 0;
fop->frame->root->gid = 0;
@@ -1832,8 +1822,8 @@ ec_update_size_version(ec_lock_link_t *link, uint64_t *version,
GF_XATTROP_ADD_ARRAY64, dict, NULL);
}
- fop->frame->root->uid = uid;
- fop->frame->root->gid = gid;
+ fop->frame->root->uid = fop->uid;
+ fop->frame->root->gid = fop->gid;
dict_unref(dict);