diff options
author | Kevin Vigor <kvigor@fb.com> | 2017-01-05 12:21:20 -0800 |
---|---|---|
committer | Kevin Vigor <kvigor@fb.com> | 2017-01-05 12:21:20 -0800 |
commit | c27aa58e72cf528583c585691e65abdb765535e5 (patch) | |
tree | fae75e5b924ac4fb80a3d4ed42203638732fbb52 /xlators/cluster/dht/src/dht-common.c | |
parent | 63403742f53ec59a6acbe26ff4c39bab1b0842ed (diff) | |
parent | cb8bc3396d16e777d9a2683886fefd43e747e8a3 (diff) |
Merge remote-tracking branch 'origin/release-3.8' into merge-3.8-again
Change-Id: I844adf2aef161a44d446f8cd9b7ebcb224ee618a
Signed-off-by: Kevin Vigor <kvigor@fb.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 50a948ffe30..a97d03bb055 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -898,8 +898,11 @@ unlock: dht_layout_set (this, local->inode, layout); } - dht_inode_ctx_time_update (local->inode, this, - &local->stbuf, 1); + if (local->inode) { + dht_inode_ctx_time_update (local->inode, this, + &local->stbuf, 1); + } + if (local->loc.parent) { dht_inode_ctx_time_update (local->loc.parent, this, &local->postparent, 1); @@ -1313,6 +1316,7 @@ dht_lookup_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local = (dht_local_t*)frame->local; path = local->loc.path; + FRAME_SU_UNDO (frame, dht_local_t); gf_msg (this->name, GF_LOG_INFO, 0, DHT_MSG_UNLINK_LOOKUP_INFO, "lookup_unlink returned with " @@ -2006,7 +2010,12 @@ unlock: loc->path, subvol->name, (local->hashed_subvol? local->hashed_subvol->name : "<null>")); - + /* * + * These stale files may be created using root + * user. Hence deletion will work only with + * root. + */ + FRAME_SU_DO (frame, dht_local_t); STACK_WIND (frame, dht_lookup_unlink_cbk, subvol, subvol->fops->unlink, loc, 0, dict_req); |