diff options
author | Poornima G <pgurusid@redhat.com> | 2018-02-19 20:45:02 +0530 |
---|---|---|
committer | Poornima G <pgurusid@redhat.com> | 2018-03-02 07:25:02 +0000 |
commit | 7e7fd3595e3ee7e260df4566edf5e1ac95fddd82 (patch) | |
tree | 12c93c2616a068153f681b123ba566c0013e7ecd /xlators/performance/md-cache/src | |
parent | 11b3bbd649e15645c916c202d1e521d141f5130b (diff) | |
download | glusterfs-7e7fd3595e3ee7e260df4566edf5e1ac95fddd82.tar.gz glusterfs-7e7fd3595e3ee7e260df4566edf5e1ac95fddd82.tar.xz glusterfs-7e7fd3595e3ee7e260df4566edf5e1ac95fddd82.zip |
md-cache: Fix coverity issue FORWARD_NULL
Change-Id: I6ace846c412d898c0bc024b5d2081b11a223372f
Signed-off-by: Poornima G <pgurusid@redhat.com>
Diffstat (limited to 'xlators/performance/md-cache/src')
-rw-r--r-- | xlators/performance/md-cache/src/md-cache.c | 7 |
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 9a6a4e4a29..bbfe2e86eb 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; } |