diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-06-15 05:29:54 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:07 +0300 |
commit | 68a507a2e8cdc9b90599bb5d220a696abdc54838 (patch) | |
tree | 5250c2cf969bea932b9f6f853ebdae29d8b50052 /fs/bcachefs/fs.h | |
parent | 8c3f6da9fc526e7ba0f6449efa1040084406e9ba (diff) | |
download | linux-68a507a2e8cdc9b90599bb5d220a696abdc54838.tar.xz |
bcachefs: fix truncate with ATTR_MODE
After the v5.12 rebase, we started oopsing when truncate was passed
ATTR_MODE, due to not passing mnt_userns to setattr_copy(). This
refactors things so that truncate/extend finish by using
bch2_setattr_nonsize(), which solves the problem.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/fs.h')
-rw-r--r-- | fs/bcachefs/fs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/fs.h b/fs/bcachefs/fs.h index f3072780af51..c08a828d66cd 100644 --- a/fs/bcachefs/fs.h +++ b/fs/bcachefs/fs.h @@ -166,6 +166,10 @@ void bch2_inode_update_after_write(struct bch_fs *, int __must_check bch2_write_inode(struct bch_fs *, struct bch_inode_info *, inode_set_fn, void *, unsigned); +int bch2_setattr_nonsize(struct mnt_idmap *, + struct bch_inode_info *, + struct iattr *); + void bch2_vfs_exit(void); int bch2_vfs_init(void); |