summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/read-only/src/worm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/read-only/src/worm.c b/xlators/features/read-only/src/worm.c
index 9a956ccd873..0f481ec766a 100644
--- a/xlators/features/read-only/src/worm.c
+++ b/xlators/features/read-only/src/worm.c
@@ -200,7 +200,7 @@ worm_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
GF_ASSERT (priv);
if (is_readonly_or_worm_enabled (this))
goto out;
- if (!priv->worm_file) {
+ if (!priv->worm_file || (frame->root->pid < 0)) {
op_errno = 0;
goto out;
}