summaryrefslogtreecommitdiff
path: root/fs/bcachefs/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/io.c')
-rw-r--r--fs/bcachefs/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c
index 6f7e4dac4268..ede2f3116935 100644
--- a/fs/bcachefs/io.c
+++ b/fs/bcachefs/io.c
@@ -1649,7 +1649,7 @@ static void __bch2_write(struct bch_write_op *op)
nofs_flags = memalloc_nofs_save();
- if (unlikely(op->opts.nocow)) {
+ if (unlikely(op->opts.nocow && c->opts.nocow_enabled)) {
bch2_nocow_write(op);
if (op->flags & BCH_WRITE_DONE)
goto out_nofs_restore;