diff options
author | Christian Brauner <brauner@kernel.org> | 2022-09-29 10:47:36 +0200 |
---|---|---|
committer | Christian Brauner (Microsoft) <brauner@kernel.org> | 2022-10-20 10:13:29 +0200 |
commit | 56851bc9b9f072dd738f25ed29c0d5abe9f2908b (patch) | |
tree | 47f432ad3754f96997fb3dc9a978fde18d79d47c /fs/internal.h | |
parent | a56df5d5b7ca6d79c3cdef32401380e60c0928b1 (diff) | |
download | linux-stable-56851bc9b9f072dd738f25ed29c0d5abe9f2908b.tar.gz linux-stable-56851bc9b9f072dd738f25ed29c0d5abe9f2908b.tar.bz2 linux-stable-56851bc9b9f072dd738f25ed29c0d5abe9f2908b.zip |
internal: add may_write_xattr()
Split out the generic checks whether an inode allows writing xattrs. Since
security.* and system.* xattrs don't have any restrictions and we're going
to split out posix acls into a dedicated api we will use this helper to
check whether we can write posix acls.
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Diffstat (limited to 'fs/internal.h')
-rw-r--r-- | fs/internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/internal.h b/fs/internal.h index 6f0386b34fae..aa5f240496d9 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -232,5 +232,6 @@ 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); ssize_t __kernel_write_iter(struct file *file, struct iov_iter *from, loff_t *pos); |