summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2015-04-03 14:14:35 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-04-06 20:57:45 -0700
commit0e23ce3fbcf1f138105476cf3b86342268e259d9 (patch)
tree6a32cf28a57b7f17d93cf9dee6feae830b053952 /xlators
parent85865daa1b7dd11badf9f5192e050e1998c76f8a (diff)
performance/md-cache: set right error check in {f}getxattr_cbk()
Currently mdc_{f}getxattr_cbk() check(s) for a non-zero value to determine if any cache update has to be performed. Right from posix xlator, op_ret has a positive value upon success and -1 upon failure. This patch sets right the check in getxattr callbacks so that xattr cache update happens for successful calls. Change-Id: Ifa5ec38bdf7e3dc095de9a56d91559b13cd9e8b6 BUG: 1208784 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/10127 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Diffstat (limited to 'xlators')
-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 d7090475a43..51c07339fdf 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -1764,7 +1764,7 @@ mdc_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
mdc_local_t *local = NULL;
- if (op_ret != 0)
+ if (op_ret < 0)
goto out;
local = frame->local;
@@ -1826,7 +1826,7 @@ mdc_fgetxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
mdc_local_t *local = NULL;
- if (op_ret != 0)
+ if (op_ret < 0)
goto out;
local = frame->local;