Skip to content

Commit

Permalink
performance/md-cache: set right error check in {f}getxattr_cbk()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vbellur authored and kalebskeithley committed Apr 7, 2015
1 parent 85865da commit 0e23ce3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xlators/performance/md-cache/src/md-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0e23ce3

Please sign in to comment.