mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 17:22:07 +00:00
acl: make posix_acl_clone() available to overlayfs
The ovl_get_acl() function needs to alter the POSIX ACLs retrieved from the lower filesystem. Instead of hand-rolling a overlayfs specific posix_acl_clone() variant allow export it. It's not special and it's not deeply internal anyway. Link: https://lore.kernel.org/r/20220708090134.385160-3-brauner@kernel.org Cc: Seth Forshee <sforshee@digitalocean.com> Cc: Amir Goldstein <amir73il@gmail.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Aleksa Sarai <cyphar@cyphar.com> Cc: Miklos Szeredi <mszeredi@redhat.com> Cc: linux-unionfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Reviewed-by: Seth Forshee <sforshee@digitalocean.com> Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
This commit is contained in:
parent
e933c15f76
commit
8043bffd01
@ -199,7 +199,7 @@ EXPORT_SYMBOL(posix_acl_alloc);
|
||||
/*
|
||||
* Clone an ACL.
|
||||
*/
|
||||
static struct posix_acl *
|
||||
struct posix_acl *
|
||||
posix_acl_clone(const struct posix_acl *acl, gfp_t flags)
|
||||
{
|
||||
struct posix_acl *clone = NULL;
|
||||
@ -213,6 +213,7 @@ posix_acl_clone(const struct posix_acl *acl, gfp_t flags)
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(posix_acl_clone);
|
||||
|
||||
/*
|
||||
* Check if an acl is valid. Returns 0 if it is, or -E... otherwise.
|
||||
|
@ -73,6 +73,7 @@ extern int set_posix_acl(struct user_namespace *, struct inode *, int,
|
||||
struct posix_acl *);
|
||||
|
||||
struct posix_acl *get_cached_acl_rcu(struct inode *inode, int type);
|
||||
struct posix_acl *posix_acl_clone(const struct posix_acl *acl, gfp_t flags);
|
||||
|
||||
#ifdef CONFIG_FS_POSIX_ACL
|
||||
int posix_acl_chmod(struct user_namespace *, struct inode *, umode_t);
|
||||
|
Loading…
Reference in New Issue
Block a user