summaryrefslogtreecommitdiff
path: root/fs/internal.h
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2022-10-24 16:43:21 +0200
committerChristian Brauner (Microsoft) <brauner@kernel.org>2022-10-24 16:43:21 +0200
commit03fd1402bd7d93bd4598fc961632ef2737a500fd (patch)
tree5c327eae239d9466d0e80c9974903ed4d4babb94 /fs/internal.h
parentb4dd412d4a6231de100ae8ce2a9e1ed649f9e748 (diff)
parent0a26bde2c9db9817e2b4c0f890236f78d4d8ed7c (diff)
Merge branch 'fs.acl.rework' into for-next
Diffstat (limited to 'fs/internal.h')
-rw-r--r--fs/internal.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/internal.h b/fs/internal.h
index 5545c26d86ae..0c8812fe7ca4 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -234,6 +234,27 @@ ssize_t do_getxattr(struct user_namespace *mnt_userns,
int setxattr_copy(const char __user *name, struct xattr_ctx *ctx);
int do_setxattr(struct user_namespace *mnt_userns, struct dentry *dentry,
struct xattr_ctx *ctx);
+int may_write_xattr(struct user_namespace *mnt_userns, struct inode *inode);
+
+#ifdef CONFIG_FS_POSIX_ACL
+int do_set_acl(struct user_namespace *mnt_userns, struct dentry *dentry,
+ const char *acl_name, const void *kvalue, size_t size);
+ssize_t do_get_acl(struct user_namespace *mnt_userns, struct dentry *dentry,
+ const char *acl_name, void *kvalue, size_t size);
+#else
+static inline int do_set_acl(struct user_namespace *mnt_userns,
+ struct dentry *dentry, const char *acl_name,
+ const void *kvalue, size_t size)
+{
+ return -EOPNOTSUPP;
+}
+static inline ssize_t do_get_acl(struct user_namespace *mnt_userns,
+ struct dentry *dentry, const char *acl_name,
+ void *kvalue, size_t size)
+{
+ return -EOPNOTSUPP;
+}
+#endif
ssize_t __kernel_write_iter(struct file *file, struct iov_iter *from, loff_t *pos);