summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2018-02-19 20:45:02 +0530
committerPoornima G <pgurusid@redhat.com>2018-03-02 07:25:02 +0000
commit7e7fd3595e3ee7e260df4566edf5e1ac95fddd82 (patch)
tree12c93c2616a068153f681b123ba566c0013e7ecd
parent11b3bbd649e15645c916c202d1e521d141f5130b (diff)
md-cache: Fix coverity issue FORWARD_NULL
Change-Id: I6ace846c412d898c0bc024b5d2081b11a223372f Signed-off-by: Poornima G <pgurusid@redhat.com>
-rw-r--r--xlators/performance/md-cache/src/md-cache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c
index 9a6a4e4a291..bbfe2e86eb0 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -986,7 +986,7 @@ mdc_load_statfs_info_from_cache (xlator_t *this, struct statvfs **buf)
/* Skip if the cache is not initialized */
if (!conf->statfs_cache.initialized) {
ret = -1;
- goto err;
+ goto unlock;
}
timespec_now (&now);
@@ -1002,13 +1002,14 @@ mdc_load_statfs_info_from_cache (xlator_t *this, struct statvfs **buf)
"Cache age %lf exceeded timeout %d",
cache_age, conf->timeout);
ret = -1;
- goto err;
+ goto unlock;
}
*buf = &conf->statfs_cache.buf;
}
-err:
+unlock:
pthread_mutex_unlock (&conf->statfs_cache.lock);
+err:
return ret;
}