summaryrefslogtreecommitdiff
path: root/fs/bcachefs/fs-ioctl.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-10-03 01:35:36 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:28 +0300
commit9638574229e3ae0175a46a63431149746c777b3a (patch)
tree01cd8a76741a838f2e3a99690ea661bca7c457a9 /fs/bcachefs/fs-ioctl.c
parent73501ab82c44b1249916ded8dcb883f7705b1549 (diff)
downloadlinux-9638574229e3ae0175a46a63431149746c777b3a.tar.xz
bcachefs: Factor out fs-common.c
This refactoring makes the code easier to understand by separating the bcachefs btree transactional code from the linux VFS code - but more importantly, it's also to share code with the fuse port. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs-ioctl.c')
-rw-r--r--fs/bcachefs/fs-ioctl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/bcachefs/fs-ioctl.c b/fs/bcachefs/fs-ioctl.c
index 0cf2621ec4fc..acc0a230ff0c 100644
--- a/fs/bcachefs/fs-ioctl.c
+++ b/fs/bcachefs/fs-ioctl.c
@@ -5,6 +5,7 @@
#include "chardev.h"
#include "dirent.h"
#include "fs.h"
+#include "fs-common.h"
#include "fs-ioctl.h"
#include "quota.h"
@@ -164,6 +165,15 @@ err:
return ret;
}
+static int bch2_reinherit_attrs_fn(struct bch_inode_info *inode,
+ struct bch_inode_unpacked *bi,
+ void *p)
+{
+ struct bch_inode_info *dir = p;
+
+ return !bch2_reinherit_attrs(bi, &dir->ei_inode);
+}
+
static int bch2_ioc_reinherit_attrs(struct bch_fs *c,
struct file *file,
struct bch_inode_info *src,