From 47a8f97b729dd6bb2a2dabd3ed250ebbdf8be7fc Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Mon, 30 Nov 2009 15:48:21 +0000 Subject: performance/stat-prefetch: don't use same variable for getting inode context of an inode and its parent. - this bug results in updation of flags in inode context of the parent instead of that of inode. Signed-off-by: Raghavendra G Signed-off-by: Anand V. Avati BUG: 221 (stat prefetch implementation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221 --- xlators/performance/stat-prefetch/src/stat-prefetch.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xlators/performance') diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c index 59ad7d83567..e20b9964520 100644 --- a/xlators/performance/stat-prefetch/src/stat-prefetch.c +++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c @@ -801,7 +801,7 @@ sp_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req) sp_cache_t *cache = NULL; struct stat postparent = {0, }, buf = {0, }; int32_t ret = -1, op_ret = -1, op_errno = EINVAL; - sp_inode_ctx_t *inode_ctx = NULL; + sp_inode_ctx_t *inode_ctx = NULL, *parent_inode_ctx = NULL; sp_local_t *local = NULL; if (loc == NULL || loc->inode == NULL) { @@ -850,8 +850,8 @@ sp_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req) if (ret == 0) { ret = inode_ctx_get (loc->parent, this, &value); if ((ret == 0) && (value != 0)) { - inode_ctx = (void *)(long)value; - postparent = inode_ctx->stbuf; + parent_inode_ctx = (void *)(long)value; + postparent = parent_inode_ctx->stbuf; buf = dirent->d_stat; op_ret = 0; op_errno = 0; @@ -867,8 +867,8 @@ sp_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req) if (ret == 0) { ret = inode_ctx_get (loc->parent, this, &value); if ((ret == 0) && (value != 0)) { - inode_ctx = (void *)(long)value; - postparent = inode_ctx->stbuf; + parent_inode_ctx = (void *)(long)value; + postparent = parent_inode_ctx->stbuf; buf = dirent->d_stat; op_ret = 0; op_errno = 0; -- cgit