summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota.c
diff options
context:
space:
mode:
authorHari Gowtham <hgowtham@redhat.com>2018-08-21 13:00:48 +0530
committerAmar Tumballi <amarts@redhat.com>2018-08-24 05:40:26 +0000
commit8c4b20bc0b9d491bee1efb1a18d87852020f045d (patch)
tree00d6508dc89e61f99d33f1fad00c5a35116aa4cf /xlators/features/marker/src/marker-quota.c
parentf75823f6fcb8aa3116f712ed69fbf4b35d4c3bdd (diff)
marker: fix for coverity issues
Fixes CID: 1325591 1356503 1325540 1351704 Change-Id: I325b1184baa81402eaa009cb36ab95e5de812f6c updates: bz#789278 Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
Diffstat (limited to 'xlators/features/marker/src/marker-quota.c')
-rw-r--r--xlators/features/marker/src/marker-quota.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index 42c2340..f6a0df8 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);