From de6936a022e34a22eca39e189da368c03b46481f Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 4 Jan 2011 03:15:35 +0000 Subject: check the value of op_ret pointer not the address Signed-off-by: Raghavendra Bhat 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c index 846d148d1f9..ac0646c44df 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)); -- cgit