Skip to content

Commit 1ba4421

Browse files
author
Kent Overstreet
committed
bcachefs: delete_dead_snapshots() doesn't need to go RW
We've been moving away from going RW lazily; if we want to go RW we do that in set_may_go_rw(), and if we didn't go RW we don't need to delete dead snapshots. Reported-by: [email protected] Signed-off-by: Kent Overstreet <[email protected]>
1 parent dbf4d79 commit 1ba4421

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

fs/bcachefs/snapshot.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,13 +1565,6 @@ int bch2_delete_dead_snapshots(struct bch_fs *c)
15651565
if (!test_and_clear_bit(BCH_FS_need_delete_dead_snapshots, &c->flags))
15661566
return 0;
15671567

1568-
if (!test_bit(BCH_FS_started, &c->flags)) {
1569-
ret = bch2_fs_read_write_early(c);
1570-
bch_err_msg(c, ret, "deleting dead snapshots: error going rw");
1571-
if (ret)
1572-
return ret;
1573-
}
1574-
15751568
trans = bch2_trans_get(c);
15761569

15771570
/*

0 commit comments

Comments
 (0)