summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-08-07 01:30:42 -0700
committerAnand Avati <avati@redhat.com>2013-08-07 03:34:29 -0700
commit1feaebfe0ae140ecafd5c37a0ce1bb5f0a1ac0cf (patch)
treec15bdd412301302c051390e81ffd113f13223b92 /xlators/performance
parentc6a555d1268c667b72728ffa58600fc0632465e4 (diff)
md-cache: fix xattr caching code in getxattr
Bad condition check, fix it! Change-Id: I6e047de70f77d7b98b2ca771a467f14a76fd62fe BUG: 994392 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5513 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/md-cache/src/md-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c
index 2f52cbe5807..f10d5fc43e7 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -1689,7 +1689,7 @@ mdc_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *key,
if (ret != 0)
goto uncached;
- if (!xattr || dict_get (xattr, (char *)key)) {
+ if (!xattr || !dict_get (xattr, (char *)key)) {
ret = -1;
op_errno = ENODATA;
}
@@ -1751,7 +1751,7 @@ mdc_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, const char *key,
if (ret != 0)
goto uncached;
- if (!xattr || dict_get (xattr, (char *)key)) {
+ if (!xattr || !dict_get (xattr, (char *)key)) {
ret = -1;
op_errno = ENODATA;
}