summaryrefslogtreecommitdiffstats
path: root/xlators/features/read-only/src/worm-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/read-only/src/worm-helper.c')
-rw-r--r--xlators/features/read-only/src/worm-helper.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/xlators/features/read-only/src/worm-helper.c b/xlators/features/read-only/src/worm-helper.c
index 2cf6ba5d438..25fbd4aa748 100644
--- a/xlators/features/read-only/src/worm-helper.c
+++ b/xlators/features/read-only/src/worm-helper.c
@@ -84,10 +84,7 @@ worm_set_state(xlator_t *this, gf_boolean_t fop_with_fd, void *file_ptr,
retention_state->worm = 1;
retention_state->retain = 1;
retention_state->legal_hold = 0;
- if (strcmp(priv->reten_mode, "relax") == 0)
- retention_state->ret_mode = 0;
- else
- retention_state->ret_mode = 1;
+ retention_state->ret_mode = priv->reten_mode;
retention_state->ret_period = priv->reten_period;
retention_state->auto_commit_period = priv->com_period;
if (fop_with_fd)