summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunaid <junaid@gluster.com>2011-11-11 17:05:43 +0530
committerVijay Bellur <vijay@gluster.com>2011-11-16 01:39:52 -0800
commitbe406a1845e84a659ca5c5834b19c094e88cbaaf (patch)
tree08491fe496d96d2e68f8342389f911df3914c589
parent01de95f41429967fffaa0e9de4badb101839c3ea (diff)
features/marker-quota: Use stack_wind_cookie in place of stack_wind to preserve the cookie value.
In marker_rename, some of the call back functions make use of cookies sent by the calling functions. In case of stack_wind the frame->cookie is over written with the address of new frame. Change-Id: I8ec98f3305700e2c3295a10dff159ca6a19a380a BUG: 3808 Reviewed-on: http://review.gluster.com/722 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--xlators/features/marker/src/marker.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 0de391c56..35b77fe6f 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -1112,10 +1112,10 @@ marker_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
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, &newloc,
- contri_key);
+ STACK_WIND_COOKIE (frame, marker_rename_release_oldp_lock,
+ frame->cookie, FIRST_CHILD(this),
+ FIRST_CHILD(this)->fops->removexattr,
+ &newloc, contri_key);
loc_wipe (&newloc);
} else {
@@ -1252,10 +1252,10 @@ marker_get_newpath_contribution (call_frame_t *frame, void *cookie,
*/
MARKER_SET_UID_GID (frame, local, frame->root);
- STACK_WIND (frame, marker_do_rename,
- FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->getxattr, &local->loc,
- contri_key);
+ STACK_WIND_COOKIE (frame, marker_do_rename,
+ frame->cookie, FIRST_CHILD(this),
+ FIRST_CHILD(this)->fops->getxattr,
+ &local->loc, contri_key);
} else {
marker_do_rename (frame, NULL, this, 0, 0, NULL);
}
@@ -1302,9 +1302,10 @@ marker_get_oldpath_contribution (call_frame_t *frame, void *cookie,
*/
MARKER_SET_UID_GID (frame, local, frame->root);
- STACK_WIND (frame, marker_get_newpath_contribution, FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->getxattr, &oplocal->loc,
- contri_key);
+ STACK_WIND_COOKIE (frame, marker_get_newpath_contribution,
+ frame->cookie, FIRST_CHILD(this),
+ FIRST_CHILD(this)->fops->getxattr,
+ &oplocal->loc, contri_key);
return 0;
quota_err: