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/xattr.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/xattr.c')
| -rw-r--r-- | fs/bcachefs/xattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/xattr.c b/fs/bcachefs/xattr.c index 56c8d3fe55a4..952aca400faf 100644 --- a/fs/bcachefs/xattr.c +++ b/fs/bcachefs/xattr.c @@ -330,7 +330,7 @@ static int bch2_xattr_get_handler(const struct xattr_handler *handler, { struct bch_inode_info *inode = to_bch_ei(vinode); struct bch_fs *c = inode->v.i_sb->s_fs_info; - int ret = bch2_trans_do(c, NULL, NULL, 0, + int ret = bch2_trans_do(c, bch2_xattr_get_trans(trans, inode, name, buffer, size, handler->flags)); if (ret < 0 && bch2_err_matches(ret, ENOENT)) |
