diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-06-24 18:24:38 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:23 -0400 |
commit | 168f4c5fb375131bd0f5996b549c5e13cc2c2bb5 (patch) | |
tree | b874959e361b914e3447e6fe3bf263a55145bea0 /fs/bcachefs/fs-ioctl.c | |
parent | e812cf38c558f4d3a6bef8a077478a6632811f0b (diff) | |
download | lwn-168f4c5fb375131bd0f5996b549c5e13cc2c2bb5.tar.gz lwn-168f4c5fb375131bd0f5996b549c5e13cc2c2bb5.zip |
bcachefs: Improve bch2_lock_inodes()
Can now be used for the two different types of locks we have so far
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs-ioctl.c')
-rw-r--r-- | fs/bcachefs/fs-ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/fs-ioctl.c b/fs/bcachefs/fs-ioctl.c index 4dca716217a6..0cf2621ec4fc 100644 --- a/fs/bcachefs/fs-ioctl.c +++ b/fs/bcachefs/fs-ioctl.c @@ -205,7 +205,7 @@ static int bch2_ioc_reinherit_attrs(struct bch_fs *c, if (ret) goto err2; - bch2_lock_inodes(src, dst); + bch2_lock_inodes(INODE_UPDATE_LOCK, src, dst); if (inode_attr_changing(src, dst, Inode_opt_project)) { ret = bch2_fs_quota_transfer(c, dst, @@ -218,7 +218,7 @@ static int bch2_ioc_reinherit_attrs(struct bch_fs *c, ret = bch2_write_inode(c, dst, bch2_reinherit_attrs_fn, src, 0); err3: - bch2_unlock_inodes(src, dst); + bch2_unlock_inodes(INODE_UPDATE_LOCK, src, dst); /* return true if we did work */ if (ret >= 0) |