diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2021-08-18 23:08:24 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2021-08-18 23:08:24 +0300 |
commit | 0cad6246621b5887d5b33fea84219d2a71f2f99a (patch) | |
tree | 2b2a42252442e71dec8043c6e20f9d8eb86925b9 /fs/overlayfs/inode.c | |
parent | 52d5a0c6bd8a89f460243ed937856354f8f253a3 (diff) | |
download | linux-0cad6246621b5887d5b33fea84219d2a71f2f99a.tar.xz |
vfs: add rcu argument to ->get_acl() callback
Add a rcu argument to the ->get_acl() callback to allow
get_cached_acl_rcu() to call the ->get_acl() method in the next patch.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/inode.c')
-rw-r--r-- | fs/overlayfs/inode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 7d52e5ef2ac7..ea335d3e55cf 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -446,12 +446,15 @@ ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size) return res; } -struct posix_acl *ovl_get_acl(struct inode *inode, int type) +struct posix_acl *ovl_get_acl(struct inode *inode, int type, bool rcu) { struct inode *realinode = ovl_inode_real(inode); const struct cred *old_cred; struct posix_acl *acl; + if (rcu) + return ERR_PTR(-ECHILD); + if (!IS_ENABLED(CONFIG_FS_POSIX_ACL) || !IS_POSIXACL(realinode)) return NULL; |