diff options
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 084e8570da18..2e802ec47b8a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -4993,12 +4993,11 @@ static int nfs4_do_set_security_label(struct inode *inode, | |||
4993 | } | 4993 | } |
4994 | 4994 | ||
4995 | static int | 4995 | static int |
4996 | nfs4_set_security_label(struct dentry *dentry, const void *buf, size_t buflen) | 4996 | nfs4_set_security_label(struct inode *inode, const void *buf, size_t buflen) |
4997 | { | 4997 | { |
4998 | struct nfs4_label ilabel, *olabel = NULL; | 4998 | struct nfs4_label ilabel, *olabel = NULL; |
4999 | struct nfs_fattr fattr; | 4999 | struct nfs_fattr fattr; |
5000 | struct rpc_cred *cred; | 5000 | struct rpc_cred *cred; |
5001 | struct inode *inode = d_inode(dentry); | ||
5002 | int status; | 5001 | int status; |
5003 | 5002 | ||
5004 | if (!nfs_server_capable(inode, NFS_CAP_SECURITY_LABEL)) | 5003 | if (!nfs_server_capable(inode, NFS_CAP_SECURITY_LABEL)) |
@@ -6255,11 +6254,11 @@ nfs4_release_lockowner(struct nfs_server *server, struct nfs4_lock_state *lsp) | |||
6255 | #define XATTR_NAME_NFSV4_ACL "system.nfs4_acl" | 6254 | #define XATTR_NAME_NFSV4_ACL "system.nfs4_acl" |
6256 | 6255 | ||
6257 | static int nfs4_xattr_set_nfs4_acl(const struct xattr_handler *handler, | 6256 | static int nfs4_xattr_set_nfs4_acl(const struct xattr_handler *handler, |
6258 | struct dentry *dentry, const char *key, | 6257 | struct dentry *unused, struct inode *inode, |
6259 | const void *buf, size_t buflen, | 6258 | const char *key, const void *buf, |
6260 | int flags) | 6259 | size_t buflen, int flags) |
6261 | { | 6260 | { |
6262 | return nfs4_proc_set_acl(d_inode(dentry), buf, buflen); | 6261 | return nfs4_proc_set_acl(inode, buf, buflen); |
6263 | } | 6262 | } |
6264 | 6263 | ||
6265 | static int nfs4_xattr_get_nfs4_acl(const struct xattr_handler *handler, | 6264 | static int nfs4_xattr_get_nfs4_acl(const struct xattr_handler *handler, |
@@ -6277,12 +6276,12 @@ static bool nfs4_xattr_list_nfs4_acl(struct dentry *dentry) | |||
6277 | #ifdef CONFIG_NFS_V4_SECURITY_LABEL | 6276 | #ifdef CONFIG_NFS_V4_SECURITY_LABEL |
6278 | 6277 | ||
6279 | static int nfs4_xattr_set_nfs4_label(const struct xattr_handler *handler, | 6278 | static int nfs4_xattr_set_nfs4_label(const struct xattr_handler *handler, |
6280 | struct dentry *dentry, const char *key, | 6279 | struct dentry *unused, struct inode *inode, |
6281 | const void *buf, size_t buflen, | 6280 | const char *key, const void *buf, |
6282 | int flags) | 6281 | size_t buflen, int flags) |
6283 | { | 6282 | { |
6284 | if (security_ismaclabel(key)) | 6283 | if (security_ismaclabel(key)) |
6285 | return nfs4_set_security_label(dentry, buf, buflen); | 6284 | return nfs4_set_security_label(inode, buf, buflen); |
6286 | 6285 | ||
6287 | return -EOPNOTSUPP; | 6286 | return -EOPNOTSUPP; |
6288 | } | 6287 | } |