summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-name.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-name.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-name.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-name.c b/xlators/cluster/afr/src/afr-self-heal-name.c
index 190be64bf4f..6895d1256f7 100644
--- a/xlators/cluster/afr/src/afr-self-heal-name.c
+++ b/xlators/cluster/afr/src/afr-self-heal-name.c
@@ -421,9 +421,13 @@ __afr_selfheal_name_do (call_frame_t *frame, xlator_t *this, inode_t *parent,
source_is_empty = afr_selfheal_name_source_empty_check (this, replies,
sources,
source);
- if (source_is_empty)
- return __afr_selfheal_name_expunge (this, parent, pargfid,
+ if (source_is_empty) {
+ ret = __afr_selfheal_name_expunge (this, parent, pargfid,
bname, inode, replies);
+ if (ret == -EIO)
+ ret = -1;
+ return ret;
+ }
ret = afr_selfheal_name_type_mismatch_check (this, replies, source,
sources, pargfid, bname);
@@ -457,9 +461,13 @@ __afr_selfheal_name_do (call_frame_t *frame, xlator_t *this, inode_t *parent,
return -1;
}
- return __afr_selfheal_name_impunge (frame, this, parent, pargfid,
- bname, inode,
- replies, gfid_idx);
+ ret = __afr_selfheal_name_impunge (frame, this, parent, pargfid,
+ bname, inode,
+ replies, gfid_idx);
+ if (ret == -EIO)
+ ret = -1;
+
+ return ret;
}