summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/fs-ioctl.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-10-03 00:35:36 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:08:28 +0200
commit9638574229e3ae0175a46a63431149746c777b3a (patch)
tree01cd8a76741a838f2e3a99690ea661bca7c457a9 /fs/bcachefs/fs-ioctl.c
parentbcachefs: Don't use sha256 for siphash str hash key (diff)
downloadlinux-9638574229e3ae0175a46a63431149746c777b3a.tar.xz
linux-9638574229e3ae0175a46a63431149746c777b3a.zip
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,