summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/features/worm_sh.t2
-rw-r--r--xlators/features/read-only/src/worm.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/tests/features/worm_sh.t b/tests/features/worm_sh.t
index 76e751b235d..da7afc084b2 100644
--- a/tests/features/worm_sh.t
+++ b/tests/features/worm_sh.t
@@ -73,5 +73,3 @@ EXPECT "qwerty" get_text_xattr user.test $B0/${V0}1/file3
EXPECT "qwerty" get_text_xattr user.test $B0/${V0}0/file3
cleanup;
-#G_TESTDEF_TEST_STATUS_NETBSD7=BAD_TEST,BUG=000000
-#G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=000000
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;
}