diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-30 23:32:20 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-03 12:44:18 -0500 |
commit | 0117591e69d1edff46bc87061e533a1e25a8c500 (patch) | |
tree | c5bff44bcfa353b11f4d0025c9c1b3ce405daee7 /fs/bcachefs/btree_io.c | |
parent | 33cc938e65a98f1d29d0a18403dbbee050dcad9a (diff) | |
download | linux-0117591e69d1edff46bc87061e533a1e25a8c500.tar.gz linux-0117591e69d1edff46bc87061e533a1e25a8c500.tar.bz2 linux-0117591e69d1edff46bc87061e533a1e25a8c500.zip |
bcachefs: Don't drop journal pins in exit path
There's no need to drop journal pins in our exit paths - the code was
trying to have everything cleaned up on any shutdown, but better to just
tweak the assertions a bit.
This fixes a bug where calling into journal reclaim in the exit path
would cass a null ptr deref.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_io.c')
-rw-r--r-- | fs/bcachefs/btree_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c index 57c20390e10e..5a720f0cd5a6 100644 --- a/fs/bcachefs/btree_io.c +++ b/fs/bcachefs/btree_io.c @@ -1704,8 +1704,8 @@ int bch2_btree_root_read(struct bch_fs *c, enum btree_id id, return bch2_trans_run(c, __bch2_btree_root_read(trans, id, k, level)); } -void bch2_btree_complete_write(struct bch_fs *c, struct btree *b, - struct btree_write *w) +static void bch2_btree_complete_write(struct bch_fs *c, struct btree *b, + struct btree_write *w) { unsigned long old, new, v = READ_ONCE(b->will_make_reachable); |