summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunaid <junaid@gluster.com>2011-11-11 17:05:43 +0530
committerVijay Bellur <vijay@gluster.com>2011-11-11 04:41:29 -0800
commitedf9551b38c18be0dab7230c75547f18c2d09747 (patch)
tree419380ae249b0d6d6b77e8dd423cb67903acba62
parent8fe39cd4d978ec1bfb57dec0e192f5934122f384 (diff)
features/marker-quota: Use stack_wind_cookie in place of stack_wind to preserve the cookie value.v3.2.5qa9v3.2.5
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/717 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 f597309e412..ee422bdc3f3 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -1109,10 +1109,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 {
@@ -1249,10 +1249,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);
}
@@ -1299,9 +1299,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: