]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bcachefs: Add missing recalc_capacity() call
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 23 Jun 2024 14:10:43 +0000 (10:10 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 23 Jun 2024 14:12:51 +0000 (10:12 -0400)
This fixes filesystem size not changing on device removal.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/super.c

index 9083df82073a562344e01af41a04b41ec4177a27..641f2975177b61cc1dd75bcd4ed362390ba3a3d5 100644 (file)
@@ -1529,6 +1529,7 @@ static void __bch2_dev_read_only(struct bch_fs *c, struct bch_dev *ca)
         * The allocator thread itself allocates btree nodes, so stop it first:
         */
        bch2_dev_allocator_remove(c, ca);
+       bch2_recalc_capacity(c);
        bch2_dev_journal_stop(&c->journal, ca);
 }