diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-15 18:53:51 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:57 +0300 |
commit | 9edbcc72f6987bbb58f113d04e7704b7a84106a6 (patch) | |
tree | d083a4cf4801bc83fd222e156513dfdce62dd59a /fs/bcachefs/super.c | |
parent | e1e7ecafe6482464ccc510afb38e1b9b306ce5dc (diff) | |
download | linux-9edbcc72f6987bbb58f113d04e7704b7a84106a6.tar.xz |
bcachefs: Fix bch2_evict_subvolume_inodes()
This fixes a bug in bch2_evict_subvolume_inodes(): d_mark_dontcache()
doesn't handle the case where i_count is already 0, we need to grab and
put the inode in order for it to be dropped.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super.c')
-rw-r--r-- | fs/bcachefs/super.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index 278f8f19a230..d6f2f453c027 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -709,6 +709,9 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts) sema_init(&c->io_in_flight, 128); + INIT_LIST_HEAD(&c->vfs_inodes_list); + mutex_init(&c->vfs_inodes_lock); + c->copy_gc_enabled = 1; c->rebalance.enabled = 1; c->promote_whole_extents = true; |