diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-02-23 15:43:26 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2022-02-25 18:50:13 -0500 |
commit | 84631f84ac95b6ff6f08a41ffba1f93eaab4e9c7 (patch) | |
tree | 1a21d245d9d62bfea52d7159a2ef7bdd65a9c6a4 /fs/nfs/dir.c | |
parent | f1ec501d08b78fd52e56124519e3e6cdecbfc16f (diff) |
NFS: Clean up NFSv4.2 xattrs
Add a helper for the xattr mask so that we can get rid of the inlined
ifdefs.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 8b190c8e4a45..ebddc736eac2 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -2995,11 +2995,8 @@ static int nfs_do_access(struct inode *inode, const struct cred *cred, int mask) /* * Determine which access bits we want to ask for... */ - cache.mask = NFS_ACCESS_READ | NFS_ACCESS_MODIFY | NFS_ACCESS_EXTEND; - if (nfs_server_capable(inode, NFS_CAP_XATTR)) { - cache.mask |= NFS_ACCESS_XAREAD | NFS_ACCESS_XAWRITE | - NFS_ACCESS_XALIST; - } + cache.mask = NFS_ACCESS_READ | NFS_ACCESS_MODIFY | NFS_ACCESS_EXTEND | + nfs_access_xattr_mask(NFS_SERVER(inode)); if (S_ISDIR(inode->i_mode)) cache.mask |= NFS_ACCESS_DELETE | NFS_ACCESS_LOOKUP; else |