From: Christian Brauner Date: Mon, 24 Oct 2022 14:43:21 +0000 (+0200) Subject: Merge branch 'fs.acl.rework' into for-next X-Git-Tag: v6.6.17~5988^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03fd1402bd7d93bd4598fc961632ef2737a500fd;p=platform%2Fkernel%2Flinux-rpi.git Merge branch 'fs.acl.rework' into for-next --- 03fd1402bd7d93bd4598fc961632ef2737a500fd diff --cc fs/internal.h index 5545c26d86ae,e377eb7bbe7f..0c8812fe7ca4 --- a/fs/internal.h +++ b/fs/internal.h @@@ -234,11 -232,26 +234,32 @@@ ssize_t do_getxattr(struct user_namespa 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); + +/* + * fs/attr.c + */ +int setattr_should_drop_sgid(struct user_namespace *mnt_userns, + const struct inode *inode);