diff options
| author | Miklos Szeredi <mszeredi@redhat.com> | 2026-01-15 13:23:40 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-01-16 10:51:12 +0100 |
| commit | 6cbfdf89470ef3c2110f376a507d135e7a7a7378 (patch) | |
| tree | 6991f78aff4f603c9b186e0e4a4fe031d5828861 /include/linux | |
| parent | 88ec797c468097a8ce97694ed11ea9c982598ec0 (diff) | |
posix_acl: make posix_acl_to_xattr() alloc the buffer
Without exception all caller do that. So move the allocation into the
helper.
This reduces boilerplate and removes unnecessary error checking.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Link: https://patch.msgid.link/20260115122341.556026-1-mszeredi@redhat.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/posix_acl_xattr.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/posix_acl_xattr.h b/include/linux/posix_acl_xattr.h index e86f3b731da2..9e1892525eac 100644 --- a/include/linux/posix_acl_xattr.h +++ b/include/linux/posix_acl_xattr.h @@ -44,8 +44,9 @@ posix_acl_from_xattr(struct user_namespace *user_ns, const void *value, } #endif -int posix_acl_to_xattr(struct user_namespace *user_ns, - const struct posix_acl *acl, void *buffer, size_t size); +extern void *posix_acl_to_xattr(struct user_namespace *user_ns, const struct posix_acl *acl, + size_t *sizep, gfp_t gfp); + static inline const char *posix_acl_xattr_name(int type) { switch (type) { |
