summaryrefslogtreecommitdiffstats
path: root/xlators/features/read-only/src/worm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/read-only/src/worm.c')
-rw-r--r--xlators/features/read-only/src/worm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/features/read-only/src/worm.c b/xlators/features/read-only/src/worm.c
index ad06f46a4e4..3e32d65dbac 100644
--- a/xlators/features/read-only/src/worm.c
+++ b/xlators/features/read-only/src/worm.c
@@ -370,8 +370,11 @@ worm_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
goto out;
}
ret = worm_get_state (this, _gf_true, fd, &reten_state);
- if (ret)
+ if (ret) {
+ if (ret == -1)
+ op_errno = 0;
goto out;
+ }
if (!reten_state.worm)
op_errno = 0;