Skip to content

Commit e48c81b

Browse files
author
Trond Myklebust
committed
NFSv4: Remove unnecessary 'minor version' check
It is completely redundant to the server capability check. Signed-off-by: Trond Myklebust <[email protected]>
1 parent f114759 commit e48c81b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

fs/nfs/inode.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,14 +378,10 @@ void nfs_setsecurity(struct inode *inode, struct nfs_fattr *fattr,
378378

379379
struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags)
380380
{
381-
struct nfs4_label *label = NULL;
382-
int minor_version = server->nfs_client->cl_minorversion;
383-
384-
if (minor_version < 2)
385-
return label;
381+
struct nfs4_label *label;
386382

387383
if (!(server->caps & NFS_CAP_SECURITY_LABEL))
388-
return label;
384+
return NULL;
389385

390386
label = kzalloc(sizeof(struct nfs4_label), flags);
391387
if (label == NULL)

0 commit comments

Comments
 (0)