summaryrefslogtreecommitdiffstats
path: root/xlators/performance/stat-prefetch/src/stat-prefetch.c
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-01-04 03:15:35 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-01-07 17:43:50 -0800
commitde6936a022e34a22eca39e189da368c03b46481f (patch)
treea98c6d84c8ca7c1a3bca7bfd6181ed54c36e098c /xlators/performance/stat-prefetch/src/stat-prefetch.c
parent2e81e4b828d53068e291100f4024d628d9a59443 (diff)
check the value of op_ret pointer not the address
Signed-off-by: Raghavendra Bhat <raghavendrabhat@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
Diffstat (limited to 'xlators/performance/stat-prefetch/src/stat-prefetch.c')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index 846d148d1..ac0646c44 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -128,7 +128,7 @@ sp_update_inode_ctx (xlator_t *this, inode_t *inode, int32_t *op_ret,
inode_ctx->lookup_in_progress = *lookup_in_progress;
}
- if ((op_ret == 0) && (stbuf != NULL)
+ if ((op_ret != NULL ) && (*op_ret == 0) && (stbuf != NULL)
&& IA_ISDIR (stbuf->ia_type)) {
memcpy (&inode_ctx->stbuf, stbuf,
sizeof (*stbuf));