summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-11-30 15:48:21 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-12-01 05:45:48 -0800
commit47a8f97b729dd6bb2a2dabd3ed250ebbdf8be7fc (patch)
tree493e50f4fda38abc12f2017d2ba0ce69c094b1c1
parentcff970c45034f917a76182bc0a326d59f2cebd40 (diff)
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 <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 221 (stat prefetch implementation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c10
1 files changed, 5 insertions, 5 deletions
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;