summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 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));