diff options
author | Raghavendra G <raghavendra@gluster.com> | 2011-09-10 15:17:49 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-20 01:41:01 -0700 |
commit | 8c5237bbd3a580c9287d18a3e71808e87f1edf9e (patch) | |
tree | 3c826c958c1927b33d9178e0af4b0407a6ab0139 /xlators | |
parent | 2e90cfb9f481f359726321148c9bff582b07dbc4 (diff) |
features/marker: Use appropriate loc struct to do removexattr on newpath after rename.
Change-Id: Idb31e845bc876f46b476d8fa769d67d8db89e4a1
BUG: 3493
Reviewed-on: http://review.gluster.com/389
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/features/marker/src/marker.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 36ce3d79e..050da8879 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -1054,6 +1054,7 @@ marker_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, call_stub_t *stub = NULL; int32_t ret = 0; char contri_key [512] = {0, }; + loc_t newloc = {0, }; local = (marker_local_t *) frame->local; @@ -1099,10 +1100,21 @@ marker_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, */ MARKER_SET_UID_GID (frame, local, frame->root); + newloc.inode = inode_ref (oplocal->loc.inode); + newloc.path = gf_strdup (local->loc.path); + newloc.name = strrchr (newloc.path, '/'); + if (newloc.name) + newloc.name++; + + newloc.parent = inode_ref (local->loc.parent); + newloc.ino = oplocal->loc.inode->ino; + STACK_WIND (frame, marker_rename_release_oldp_lock, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->removexattr, &local->loc, + FIRST_CHILD(this)->fops->removexattr, &newloc, contri_key); + + loc_wipe (&newloc); } else { frame->local = NULL; |