Skip to contentSkip to conversation

NFSv4: Remove unnecessary 'minor version' check

PATCH New [email protected] 1 participant 1 message Nov 5, 2021

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 NFSv4: Remove unnecessary 'minor version' check

From: Trond Myklebust <[email protected]>

It is completely redundant to the server capability check.

---
 fs/nfs/inode.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
fs/nfs/inode.c +2 -6
index b81b2d2f47ad..b4cb75c45f90 100644
@@ -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)
Signature · 1 line
2.33.1