diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2021-08-18 22:08:24 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2021-08-18 22:08:24 +0200 |
commit | 0cad6246621b5887d5b33fea84219d2a71f2f99a (patch) | |
tree | 2b2a42252442e71dec8043c6e20f9d8eb86925b9 /fs/overlayfs | |
parent | 52d5a0c6bd8a89f460243ed937856354f8f253a3 (diff) | |
download | linux-stable-0cad6246621b5887d5b33fea84219d2a71f2f99a.tar.gz linux-stable-0cad6246621b5887d5b33fea84219d2a71f2f99a.tar.bz2 linux-stable-0cad6246621b5887d5b33fea84219d2a71f2f99a.zip |
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')
-rw-r--r-- | fs/overlayfs/inode.c | 5 | ||||
-rw-r--r-- | fs/overlayfs/overlayfs.h | 2 |
2 files changed, 5 insertions, 2 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; diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index e9b3e7880fc0..3894f3347955 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -498,7 +498,7 @@ int ovl_xattr_set(struct dentry *dentry, struct inode *inode, const char *name, int ovl_xattr_get(struct dentry *dentry, struct inode *inode, const char *name, void *value, size_t size); ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size); -struct posix_acl *ovl_get_acl(struct inode *inode, int type); +struct posix_acl *ovl_get_acl(struct inode *inode, int type, bool rcu); int ovl_update_time(struct inode *inode, struct timespec64 *ts, int flags); bool ovl_is_private_xattr(struct super_block *sb, const char *name); |