Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp671026ybk; Fri, 15 May 2020 10:28:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJHPvGCSQhyr8CzqKo1rwlNMuuDdL68ZGzSSTQgsWYtjuQ4FCBkhlAAeOcoC84tuvMnLci X-Received: by 2002:a17:906:4c8e:: with SMTP id q14mr4040636eju.208.1589563737663; Fri, 15 May 2020 10:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589563737; cv=none; d=google.com; s=arc-20160816; b=1LQ4ds5wICQXznnA0GNAWjRZlfVsMNDOLv9KPP/bzr6OxBZIgh9QmoO3ZcA7qyeJfx sGS2DBosmhRBnU56nH9NuyLqOsvJUuFVSdGTEB9LqVT/27owKcQSsefLl/zb84XLXTAa oXOFF6ZInioya9VTV8DC9sHlSpaouONs+qmIxlDHtNvq3b4ggOlN3yHUq4RAHBB4sA9W hRl/ocQ3El0WkCgjYocAreOJP+sU29uGauZ2N3MguufFIBXGvtBDbdWtDvs58bahi8ou 8OB49YICYKCx1QbstilRO/gMGc9CqD+lYwz5H0gH6Mugs7nE/lBDGZMwMgw95graQX3+ ospw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:to:dkim-signature; bh=18mwp/q8sV8ky3Xs5Csf6eFReIMsx0xc80Vz0Im9aK8=; b=kTdLFOB5EpnNowiTkT52Lgoh3kE0349FvXiJuoGepDSuzd8QyhFdW6QbxQldE3MtkW CSPd0ea3EC4FTjaHXfK0gZqKIr0K1PX2iuTfRg3EImyDUH5QWq+1XiXn+/XohqPvajCo G+3rRJpxympjIpeeNcrAXGRTQOvsBejNX3vocowWRPUxfXkIv9eXth2EEwJMh5itKxb5 ForfKiNGgjT+e3qohVeU/EQJbdntUPdbznH2qwkPXpJLCNXNqHzWfyLSO8xhh8H6NilI daFo409zQ8AdqKJ9LyBFXdt2MxnzCHxA1xTLwlom7pLHWkLSNe6S8jXtqFLlXm9dqK2l bvlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=AYT3eRrV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r1si1651950eji.355.2020.05.15.10.28.23; Fri, 15 May 2020 10:28:57 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=AYT3eRrV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726372AbgEOR1o (ORCPT + 99 others); Fri, 15 May 2020 13:27:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726168AbgEOR1n (ORCPT ); Fri, 15 May 2020 13:27:43 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24C75C061A0C; Fri, 15 May 2020 10:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Subject:From:To:Sender:Reply-To:Cc: Content-ID:Content-Description:In-Reply-To:References; bh=18mwp/q8sV8ky3Xs5Csf6eFReIMsx0xc80Vz0Im9aK8=; b=AYT3eRrVNy9OS3ow10EwcjCcYe HDo7BHlOZGG6GoeWHX+hq6EXMisOZ/X4fA0GPq1zilq3XFO57QKal2qmZ7tMcCksU2nKxmKuNMaNu +EoiYsOFuboNCtPZE6ZFjCSVhRSz57+fhKpljr35lIoDdwGF0cMASNNZba4HnPVeyYY97QP0CzeBO MK22lgrr0XJB6KxvgKKQ8w9hqB//g42yGpFNoOVjz5kXTEIyQFKguQF0ObZY1+2sbQDFP0nJ5ALs/ EvGx10W/hMWWrBg3tpEUvbnhCGg2P1oCW4F7LiWtZsBWyeFmjE4W3DDKPg1Im6BuQ5DCthaRVmNrW 2Tlpt3YA==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZe7Z-0008Ua-Ff; Fri, 15 May 2020 17:27:41 +0000 To: "open list:NFS, SUNRPC, AND..." , Linux FS Devel , Al Viro , David Howells , Trond Myklebust , Anna Schumaker , LKML From: Randy Dunlap Subject: [PATCH -next] nfs: fsinfo: fix build when CONFIG_NFS_V4 is not enabled Message-ID: Date: Fri, 15 May 2020 10:27:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Randy Dunlap Fix multiple build errors when CONFIG_NFS_V4 is not enabled. ../fs/nfs/fsinfo.c: In function 'nfs_fsinfo_get_supports': ../fs/nfs/fsinfo.c:153:12: error: 'const struct nfs_server' has no member named 'attr_bitmask' if (server->attr_bitmask[0] & FATTR4_WORD0_SIZE) ^~ ../fs/nfs/fsinfo.c:155:12: error: 'const struct nfs_server' has no member named 'attr_bitmask' if (server->attr_bitmask[1] & FATTR4_WORD1_NUMLINKS) ^~ ../fs/nfs/fsinfo.c:158:12: error: 'const struct nfs_server' has no member named 'attr_bitmask' if (server->attr_bitmask[0] & FATTR4_WORD0_ARCHIVE) ^~ ../fs/nfs/fsinfo.c:160:12: error: 'const struct nfs_server' has no member named 'attr_bitmask' if (server->attr_bitmask[0] & FATTR4_WORD0_HIDDEN) ^~ ../fs/nfs/fsinfo.c:162:12: error: 'const struct nfs_server' has no member named 'attr_bitmask' if (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM) ^~ ../fs/nfs/fsinfo.c: In function 'nfs_fsinfo_get_features': ../fs/nfs/fsinfo.c:205:12: error: 'const struct nfs_server' has no member named 'attr_bitmask' if (server->attr_bitmask[0] & FATTR4_WORD0_CASE_INSENSITIVE) ^~ ../fs/nfs/fsinfo.c:207:13: error: 'const struct nfs_server' has no member named 'attr_bitmask' if ((server->attr_bitmask[0] & FATTR4_WORD0_ARCHIVE) || ^~ ../fs/nfs/fsinfo.c:208:13: error: 'const struct nfs_server' has no member named 'attr_bitmask' (server->attr_bitmask[0] & FATTR4_WORD0_HIDDEN) || ^~ ../fs/nfs/fsinfo.c:209:13: error: 'const struct nfs_server' has no member named 'attr_bitmask' (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM)) ^~ Signed-off-by: Randy Dunlap Cc: linux-nfs@vger.kernel.org Cc: Trond Myklebust Cc: Anna Schumaker Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: David Howells --- fs/nfs/fsinfo.c | 5 +++++ 1 file changed, 5 insertions(+) --- linux-next-20200515.orig/fs/nfs/fsinfo.c +++ linux-next-20200515/fs/nfs/fsinfo.c @@ -5,6 +5,7 @@ * Written by David Howells (dhowells@redhat.com) */ +#include #include #include #include "internal.h" @@ -150,6 +151,7 @@ static int nfs_fsinfo_get_supports(struc sup->stx_mask |= STATX_CTIME; if (server->caps & NFS_CAP_MTIME) sup->stx_mask |= STATX_MTIME; +#if IS_ENABLED(CONFIG_NFS_V4) if (server->attr_bitmask[0] & FATTR4_WORD0_SIZE) sup->stx_mask |= STATX_SIZE; if (server->attr_bitmask[1] & FATTR4_WORD1_NUMLINKS) @@ -161,6 +163,7 @@ static int nfs_fsinfo_get_supports(struc sup->win_file_attrs |= ATTR_HIDDEN; if (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM) sup->win_file_attrs |= ATTR_SYSTEM; +#endif sup->stx_attributes = STATX_ATTR_AUTOMOUNT; return sizeof(*sup); @@ -202,12 +205,14 @@ static int nfs_fsinfo_get_features(struc if (server->caps & NFS_CAP_MTIME) fsinfo_set_feature(ft, FSINFO_FEAT_HAS_MTIME); +#if IS_ENABLED(CONFIG_NFS_V4) if (server->attr_bitmask[0] & FATTR4_WORD0_CASE_INSENSITIVE) fsinfo_set_feature(ft, FSINFO_FEAT_NAME_CASE_INDEP); if ((server->attr_bitmask[0] & FATTR4_WORD0_ARCHIVE) || (server->attr_bitmask[0] & FATTR4_WORD0_HIDDEN) || (server->attr_bitmask[1] & FATTR4_WORD1_SYSTEM)) fsinfo_set_feature(ft, FSINFO_FEAT_WINDOWS_ATTRS); +#endif return sizeof(*ft); }