summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2011-09-10 15:22:37 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-19 01:22:28 -0700
commit02db3a0e457654b35c1a147403f1e99f691dcd52 (patch)
treebdc0cb4cbe952532e09162375113da5577c80dd8
parent9895baf2719ac9911bc20ca54d0ff84f761baaed (diff)
features/marker: Use appropriate loc struct to do removexattr on newpath after rename.
Change-Id: I060e62c1fbb288179063a6d64d73bad1a6572661 BUG: 3493 Reviewed-on: http://review.gluster.com/390 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--xlators/features/marker/src/marker.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 36ce3d79e23..7ddc7968f2e 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,20 @@ 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;