summaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/fs-io.c')
-rw-r--r--fs/bcachefs/fs-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c
index 00475b99dff8..d7fb28cc95c7 100644
--- a/fs/bcachefs/fs-io.c
+++ b/fs/bcachefs/fs-io.c
@@ -2351,7 +2351,7 @@ static long bch2_fallocate(struct bch_inode_info *inode, int mode,
loff_t block_start, block_end;
loff_t end = offset + len;
unsigned sectors;
- unsigned replicas = READ_ONCE(c->opts.data_replicas);
+ unsigned replicas = io_opts(c, inode).data_replicas;
int ret;
bch2_btree_iter_init(&iter, c, BTREE_ID_EXTENTS, POS_MIN,