Commit 0cad6246 authored by Miklos Szeredi's avatar Miklos Szeredi
Browse files

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: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 52d5a0c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ prototypes::
	const char *(*get_link) (struct dentry *, struct inode *, struct delayed_call *);
	void (*truncate) (struct inode *);
	int (*permission) (struct inode *, int, unsigned int);
	int (*get_acl)(struct inode *, int);
	struct posix_acl * (*get_acl)(struct inode *, int, bool);
	int (*setattr) (struct dentry *, struct iattr *);
	int (*getattr) (const struct path *, struct kstat *, u32, unsigned int);
	ssize_t (*listxattr) (struct dentry *, char *, size_t);
+1 −1
Original line number Diff line number Diff line
@@ -432,7 +432,7 @@ As of kernel 2.6.22, the following members are defined:
		const char *(*get_link) (struct dentry *, struct inode *,
					 struct delayed_call *);
		int (*permission) (struct user_namespace *, struct inode *, int);
		int (*get_acl)(struct inode *, int);
		struct posix_acl * (*get_acl)(struct inode *, int, bool);
		int (*setattr) (struct user_namespace *, struct dentry *, struct iattr *);
		int (*getattr) (struct user_namespace *, const struct path *, struct kstat *, u32, unsigned int);
		ssize_t (*listxattr) (struct dentry *, char *, size_t);
+4 −1
Original line number Diff line number Diff line
@@ -97,10 +97,13 @@ static struct posix_acl *v9fs_get_cached_acl(struct inode *inode, int type)
	return acl;
}

struct posix_acl *v9fs_iop_get_acl(struct inode *inode, int type)
struct posix_acl *v9fs_iop_get_acl(struct inode *inode, int type, bool rcu)
{
	struct v9fs_session_info *v9ses;

	if (rcu)
		return ERR_PTR(-ECHILD);

	v9ses = v9fs_inode2v9ses(inode);
	if (((v9ses->flags & V9FS_ACCESS_MASK) != V9FS_ACCESS_CLIENT) ||
			((v9ses->flags & V9FS_ACL_MASK) != V9FS_POSIX_ACL)) {
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

#ifdef CONFIG_9P_FS_POSIX_ACL
extern int v9fs_get_acl(struct inode *, struct p9_fid *);
extern struct posix_acl *v9fs_iop_get_acl(struct inode *inode, int type);
extern struct posix_acl *v9fs_iop_get_acl(struct inode *inode, int type, bool rcu);
extern int v9fs_acl_chmod(struct inode *, struct p9_fid *);
extern int v9fs_set_create_acl(struct inode *, struct p9_fid *,
			       struct posix_acl *, struct posix_acl *);
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ static const char *bad_inode_get_link(struct dentry *dentry,
	return ERR_PTR(-EIO);
}

static struct posix_acl *bad_inode_get_acl(struct inode *inode, int type)
static struct posix_acl *bad_inode_get_acl(struct inode *inode, int type, bool rcu)
{
	return ERR_PTR(-EIO);
}
Loading