diff options
-rw-r--r-- | xlators/features/marker/src/marker-quota.c | 18 | ||||
-rw-r--r-- | xlators/features/marker/src/marker.c | 9 |
2 files changed, 15 insertions, 12 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 42c23403ce7..f6a0df810bc 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -1671,7 +1671,7 @@ mq_initiate_quota_task (void *opaque) out: if (dirty) { - if (ret < 0 || prev_dirty) { + if (ret < 0) { /* On failure clear dirty status flag. * In the next lookup inspect_directory_xattr * can set the status flag and fix the @@ -2127,14 +2127,16 @@ mq_xattr_state (xlator_t *this, loc_t *origin_loc, dict_t *dict, ret = -1; goto out; } - } - - if (buf.ia_type == IA_IFDIR || loc_is_root(&loc)) - mq_inspect_directory_xattr (this, ctx, contribution, &loc, dict, + if (buf.ia_type == IA_IFDIR) + mq_inspect_directory_xattr (this, ctx, contribution, + &loc, dict, buf); + else + mq_inspect_file_xattr (this, ctx, contribution, + &loc, dict, buf); + } else { + mq_inspect_directory_xattr (this, ctx, 0, &loc, dict, buf); - else - mq_inspect_file_xattr (this, ctx, contribution, &loc, dict, - buf); + } out: loc_wipe (&loc); diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 522fdfb86d1..57f47ddec97 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -1583,10 +1583,11 @@ marker_get_oldpath_contribution (call_frame_t *lk_frame, void *cookie, "cannot hold inodelk on %s (gfid:%s) (%s)", oplocal->loc.path, uuid_utoa (oplocal->loc.inode->gfid), strerror (op_errno)); + if (local->lk_frame) { + STACK_DESTROY (local->lk_frame->root); + local->lk_frame = NULL; + } goto err; - - STACK_DESTROY (local->lk_frame->root); - local->lk_frame = NULL; } GET_CONTRI_KEY (this, contri_key, oplocal->loc.parent->gfid, ret); @@ -3430,7 +3431,7 @@ init (xlator_t *this) if (data) ret = gf_string2int32 (data->data, &priv->version); - if (priv->feature_enabled && priv->version < 0) { + if ((ret == 0) && priv->feature_enabled && priv->version < 0) { gf_log (this->name, GF_LOG_ERROR, "Invalid quota version %d", priv->version); goto err; |