summaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs-io.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-06-15 05:29:54 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:07 +0300
commit68a507a2e8cdc9b90599bb5d220a696abdc54838 (patch)
tree5250c2cf969bea932b9f6f853ebdae29d8b50052 /fs/bcachefs/fs-io.h
parent8c3f6da9fc526e7ba0f6449efa1040084406e9ba (diff)
downloadlinux-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-io.h')
-rw-r--r--fs/bcachefs/fs-io.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/fs-io.h b/fs/bcachefs/fs-io.h
index 2a2df58a46bb..64b16b44e25a 100644
--- a/fs/bcachefs/fs-io.h
+++ b/fs/bcachefs/fs-io.h
@@ -31,7 +31,8 @@ ssize_t bch2_write_iter(struct kiocb *, struct iov_iter *);
int bch2_fsync(struct file *, loff_t, loff_t, int);
-int bch2_truncate(struct bch_inode_info *, struct iattr *);
+int bch2_truncate(struct mnt_idmap *,
+ struct bch_inode_info *, struct iattr *);
long bch2_fallocate_dispatch(struct file *, int, loff_t, loff_t);
loff_t bch2_remap_file_range(struct file *, loff_t, struct file *,