diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-10-13 21:53:26 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-10-18 00:49:48 -0400 |
| commit | a0d11feefb1998204f095fa0400024403d233108 (patch) | |
| tree | 42383b82d98c3673061d1ef54868d118b743f66b /fs/bcachefs/inode.c | |
| parent | bcachefs: handle restarts in bch2_bucket_io_time_reset() (diff) | |
| download | linux-a0d11feefb1998204f095fa0400024403d233108.tar.gz linux-a0d11feefb1998204f095fa0400024403d233108.zip | |
bcachefs: Don't use commit_do() unnecessarily
Using commit_do() to call alloc_sectors_start_trans() breaks when we're
randomly injecting transaction restarts - the restart in the commit
causes us to leak the lock that alloc_sectorS_start_trans() takes.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/inode.c')
| -rw-r--r-- | fs/bcachefs/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index 2c037e84fbae..47544dc91d9e 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -1087,8 +1087,7 @@ int bch2_inode_find_by_inum_trans(struct btree_trans *trans, int bch2_inode_find_by_inum(struct bch_fs *c, subvol_inum inum, struct bch_inode_unpacked *inode) { - return bch2_trans_do(c, NULL, NULL, 0, - bch2_inode_find_by_inum_trans(trans, inum, inode)); + return bch2_trans_do(c, bch2_inode_find_by_inum_trans(trans, inum, inode)); } int bch2_inode_nlink_inc(struct bch_inode_unpacked *bi) |
