summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/super.c
diff options
context:
space:
mode:
authorDaniel Hill <daniel@gluo.nz>2022-03-05 17:45:27 +1300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:26 -0400
commit102a6a8f69b06df0e6594af4932ef47804f645c6 (patch)
tree032fd823b38271454ae99fb6beccfd1b5c191792 /fs/bcachefs/super.c
parent3098553776a16c08446c408005090423d62e6b54 (diff)
downloadlinux-102a6a8f69b06df0e6594af4932ef47804f645c6.tar.gz
linux-102a6a8f69b06df0e6594af4932ef47804f645c6.tar.bz2
linux-102a6a8f69b06df0e6594af4932ef47804f645c6.zip
bcachefs: respect superblock discard flag.
We were accidentally using default mount options and overwriting the discard flag. Signed-off-by: Daniel Hill <daniel@gluo.nz> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super.c')
-rw-r--r--fs/bcachefs/super.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index 27716d6e962d..0bc78c50150a 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -1167,9 +1167,6 @@ static struct bch_dev *__bch2_dev_alloc(struct bch_fs *c,
ca->mi = bch2_mi_to_cpu(member);
ca->uuid = member->uuid;
- if (opt_defined(c->opts, discard))
- ca->mi.discard = opt_get(c->opts, discard);
-
if (percpu_ref_init(&ca->ref, bch2_dev_ref_complete,
0, GFP_KERNEL) ||
percpu_ref_init(&ca->io_ref, bch2_dev_io_ref_complete,