NFSv4: Remove unnecessary 'minor version' check

It is completely redundant to the server capability check.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
Trond Myklebust 2021-11-05 13:40:11 -04:00
Родитель f114759c32
Коммит e48c81bbc1
1 изменённых файлов: 2 добавлений и 6 удалений

Просмотреть файл

@ -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 *nfs4_label_alloc(struct nfs_server *server, gfp_t flags)
{ {
struct nfs4_label *label = NULL; struct nfs4_label *label;
int minor_version = server->nfs_client->cl_minorversion;
if (minor_version < 2)
return label;
if (!(server->caps & NFS_CAP_SECURITY_LABEL)) if (!(server->caps & NFS_CAP_SECURITY_LABEL))
return label; return NULL;
label = kzalloc(sizeof(struct nfs4_label), flags); label = kzalloc(sizeof(struct nfs4_label), flags);
if (label == NULL) if (label == NULL)