summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-08-07 01:30:42 -0700
committerAnand Avati <avati@redhat.com>2013-09-09 17:17:13 -0700
commitcf5a6e9756d52991f4a0406639c422b01e76b053 (patch)
tree68be50ec6bc7faaabb8e689513b6e6f109275bd5
parent6e9dbdd6e16cca1e32e7c7e00b2618a837f1c18a (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> Reviewed-on: http://review.gluster.org/5805 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
-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 88d7997e7..b7f1f1d13 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -1760,7 +1760,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;
}
@@ -1822,7 +1822,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;
}