summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2021-11-05 13:40:11 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2021-11-05 14:54:30 -0400
commite48c81bbc188964ac3932539e53287491f2c1d87 (patch)
treea7679fabf6f764b88b390ec3eaa16fd39a7b1a49 /fs/nfs/inode.c
parentf114759c322edb4f293941a62748e31858852cd1 (diff)
downloadlinux-e48c81bbc188964ac3932539e53287491f2c1d87.tar.bz2
NFSv4: Remove unnecessary 'minor version' check
It is completely redundant to the server capability check. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index b81b2d2f47ad..b4cb75c45f90 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -378,14 +378,10 @@ void nfs_setsecurity(struct inode *inode, struct nfs_fattr *fattr,
struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags)
{
- struct nfs4_label *label = NULL;
- int minor_version = server->nfs_client->cl_minorversion;
-
- if (minor_version < 2)
- return label;
+ struct nfs4_label *label;
if (!(server->caps & NFS_CAP_SECURITY_LABEL))
- return label;
+ return NULL;
label = kzalloc(sizeof(struct nfs4_label), flags);
if (label == NULL)