diff options
| -rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 31bea00d203..697091cebc0 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -3935,6 +3935,7 @@ dht_setxattr2 (xlator_t *this, xlator_t *subvol, call_frame_t *frame, int ret)                  goto err;          local = frame->local; +        op_errno = local->op_errno;          if (we_are_not_migrating (ret)) {                  /* This dht xlator is not migrating the file. Unwind and @@ -3949,7 +3950,6 @@ dht_setxattr2 (xlator_t *this, xlator_t *subvol, call_frame_t *frame, int ret)          if (subvol == NULL)                  goto err; -        op_errno = local->op_errno;          local->call_cnt = 2; /* This is the second attempt */ @@ -4358,10 +4358,11 @@ dht_removexattr2 (xlator_t *this, xlator_t *subvol, call_frame_t *frame,          dht_local_t *local    = NULL;          int          op_errno = EINVAL; -        if (!frame || !frame->local || !subvol) +        if (!frame || !frame->local)                  goto err;          local = frame->local; +        op_errno = local->op_errno;          local->call_cnt = 2; /* This is the second attempt */ @@ -4376,6 +4377,9 @@ dht_removexattr2 (xlator_t *this, xlator_t *subvol, call_frame_t *frame,                  return 0;          } +        if (subvol == NULL) +                goto err; +          if (local->fop == GF_FOP_REMOVEXATTR) {                  STACK_WIND_COOKIE (frame, dht_file_removexattr_cbk, subvol,                                     subvol, subvol->fops->removexattr,  | 
