diff options
author | Frank van der Linden | 2020-06-23 22:38:58 +0000 |
---|---|---|
committer | Trond Myklebust | 2020-07-13 17:52:45 -0400 |
commit | 72832a2453d9ca752beedb3a4fb2fc82e375c46c (patch) | |
tree | abf4664b985f2d18d2c3e536ebb57c644dea846e /fs/nfs/nfs4proc.c | |
parent | d2ae4f8b21c111bb795c557588d89dccd005828d (diff) |
NFSv4.2: query the extended attribute access bits
RFC 8276 defines separate ACCESS bits for extended attribute checking.
Query them in nfs_do_access and opendata.
Signed-off-by: Frank van der Linden <fllinden@amazon.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 64e081459327..c88351f8b18d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1341,6 +1341,12 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry, NFS4_ACCESS_MODIFY | NFS4_ACCESS_EXTEND | NFS4_ACCESS_EXECUTE; +#ifdef CONFIG_NFS_V4_2 + if (server->caps & NFS_CAP_XATTR) + p->o_arg.access |= NFS4_ACCESS_XAREAD | + NFS4_ACCESS_XAWRITE | + NFS4_ACCESS_XALIST; +#endif } } p->o_arg.clientid = server->nfs_client->cl_clientid; |