diff options
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 1dfe33327b8..8f7ae8809e3 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -587,6 +587,12 @@ libgf_is_iattr_cache_valid (libglusterfs_client_ctx_t *ctx, inode_t *inode, return 0; inode_ctx = libgf_get_inode_ctx (inode); + if (!inode_ctx) { + gf_log (LIBGF_XL_NAME, GF_LOG_ERROR, "No inode context" + " present\n"); + return 0; + } + pthread_mutex_lock (&inode_ctx->lock); { current = time (NULL); |