Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3276908pxb; Fri, 5 Nov 2021 12:48:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCS6/d0bk1VhQxiZ0UHpSZyHLA4BJlpN7Tk5VtNW5xDM0fHmzlJZKMCkLEjXtdhaCV7kRW X-Received: by 2002:a50:9b4b:: with SMTP id a11mr81293744edj.316.1636141689838; Fri, 05 Nov 2021 12:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636141689; cv=none; d=google.com; s=arc-20160816; b=K5SiE76a1Kh7F7VSxHD0uoQzCgt4vsID2a+SjUtfty+4UWfkW56uWcdA43Mwx6Ku+0 NlwpnwE5kVZamfOiGrPrk0zg9LKM5XZMs8OsoAY+sIZjGfJYlWq3iiKU4biKDVogUAqp LDzVtdAOeVuRB5nuSpSZzylPlDMRma4tj9qTJazn1j2hhdz0X+yxbW9989qfD3fVPaRe L/CDXN6jO9YlXgXUYE2yNsiqwcuoc3f8CGGBgr8HHJ0YIbptgy+GlM2MPBeYmkKk3HOX oEbWCKpu9xMb5kFrGego44otPzNoFQU/Go8vTIDQyYQIeYSa5PwbWlNwxmMmCkwDbX+G 8Vgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=5R454Jr9r4H+8xN7YNd1huaS9Xrd0kJLFb8NiVw7U8o=; b=ddOKbpnW29TxKxRu0T1iEoxSWSNkfnrgsC+BAU3+gSLOs3zOGoqXEbBZejcqWUHoja hKl2vwVlnrJ7Y1aSxxX4fIHr2YeZh2x5+vrIDISXkiTXlWSXLSLXciWDGi9Sg4T6p4Q0 dQkOnGYFE4jTKg1Tyv5SiLqsE3Wu0NwXhgz5GblMQn1mUzjfNrXvwavNKrxo/7ghlz2W 50+3cPcipKTc4Hho6w/wmQesIK+/lkL0RhoyqrAP0e8Ilm8STSKBFeugK0lfdzX5CRF+ h/bxu+uZBQVT7AqGdPvJuNDnkphSIz9PRkTKEtSdY4UTPUz1CKAv4djvfxIGEcsL5hkb ZKsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bGxoXWy4; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 17si12774204eja.485.2021.11.05.12.47.33; Fri, 05 Nov 2021 12:48:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bGxoXWy4; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232704AbhKESr0 (ORCPT + 99 others); Fri, 5 Nov 2021 14:47:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:52676 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231904AbhKESrY (ORCPT ); Fri, 5 Nov 2021 14:47:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8CCC661186 for ; Fri, 5 Nov 2021 18:44:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636137884; bh=rcHD4hAf8x0Zpr6Ab7Ns3fgbqvBFYTyeiAHHsbVzxyY=; h=From:To:Subject:Date:From; b=bGxoXWy4Exe5z/+JsSklhpeRtTi3kphi/x0RHUbv6A29rrHU8+AUUvped6LGvHoap N/DUaI4/6Jz281zXtb5lvjYMZNlqxJvdL4PuLI4J/0EHc3FHF2mxi8CNv4QfFp5Pkw opQKJoJR7wqmjsrws1S3WTC8pCHR80T7H9Enzt0b0xXT5YC8rvkNGsTcOu+lyubtsr yh3qdCLIJDXvjS5/UVnzLcvbAXifQX+9GGDK1rh+Jk+oDYE0LN4gvrf+szo9SvEFpK elzbTMGsHBnKs005QS9Kd4bs1RsIggSdlBZ5qD0qUM3R3PQjzCxNm+QBHKXWwqUNHu gAyhTxI+jbOpQ== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH] NFSv4: Remove unnecessary 'minor version' check Date: Fri, 5 Nov 2021 14:38:16 -0400 Message-Id: <20211105183816.328639-3-trondmy@kernel.org> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust It is completely redundant to the server capability check. Signed-off-by: Trond Myklebust --- fs/nfs/inode.c | 8 ++------ 1 file 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) -- 2.33.1