From patchwork Thu Oct 26 19:28:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 158663 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp119155vqb; Thu, 26 Oct 2023 12:28:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMNi+BbNAtYsq75Pmr9+NWq7+123780GQ8U3W2LZAFCC1G3H48uGscqnp5QSaz8nrZNAWi X-Received: by 2002:a05:6808:4405:b0:3b5:37c6:6dcb with SMTP id eo5-20020a056808440500b003b537c66dcbmr55840oib.21.1698348539099; Thu, 26 Oct 2023 12:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698348539; cv=none; d=google.com; s=arc-20160816; b=fsVTcbITikh7/SmZmCcQ8gLexGPDyT6y1zg6J0gJuRpq3Cw03BOfb14bGbbwKxMhzr mbO31n3MLUOpC4p28mPYaGZFbFDoHpd30vriwmxKvRay/vr8NAIsm25hlEYx3qQ88gVT 0/3tlNjnytntu5j8J1sJtm74/eVPSMNCGHqVmM+SOew06Djv4uSth0KT1ksaVCXuGkEA XQF4oQf0menIwRDIs3vmFI6GLqzlxzYVQlPE89SskNipCCOy0tFCRZuWQ8+yrOD50AnP 4N40yjaxzY+B8aH26XyarhIhQgH1TbN8bLih3wBA8j+XgX+0iVL+VPBlDvJ4cjk5w51p 8OxQ== 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:cc:to:from:dkim-signature; bh=ToUeE8jlH67uNaR3XjokfMyr/EVi5kLp33HH0pq5Mw8=; fh=wmMDUrrXsf+ZO8uv1g80T9O9thvsUI8RGDGsdKYkzsw=; b=jMHn+1+pyRwsWwY1zwqY66sdMTp+wSUQk3eg9+PL974Ed9EZ+oHTqlEGtObMnQx5sD vnSagx5hU2wHgHdnU0c7kDf0NOGG0JGQu0VO56WKMug7/zKFrR9hhIgnYPcRBO5dLcnH WagZ5e4i/1Vi24/W4rYB/xFxaP5+G3CrbTaTlB6oD/GV3/1cHVcflpX+dBNXFzG4o6+Q OXqYSkUMt/9miMAzjrEBamvv5a1/sXfE7VYki26cI3v8HDPU0AINmkMG01DIipdL69Ug cGSR7cYUp6p69wRoe+QBCT6rvm/IWaLBnn+mtyWDDPAR7OrV991Mtfs9/+xtyANbMNzP Rk7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=iqcIoqmm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id c12-20020a25a2cc000000b00d9a4a89d97esi99161ybn.323.2023.10.26.12.28.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 12:28:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=iqcIoqmm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B73B68246332; Thu, 26 Oct 2023 12:28:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230143AbjJZT2i (ORCPT + 26 others); Thu, 26 Oct 2023 15:28:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbjJZT2h (ORCPT ); Thu, 26 Oct 2023 15:28:37 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F23C12A; Thu, 26 Oct 2023 12:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=ToUeE8jlH67uNaR3XjokfMyr/EVi5kLp33HH0pq5Mw8=; b=iqcIoqmmABN4vQb9TcuI7xO06L +9xFV3rGU763GNNot3CgGUyn+WkmnlNbr8mbozea7ydt8jdiXQZ0m+tYOky12mTbafLqqsjlHEzoF BnwOn8xyLYr5TM8zvHVJynk3A3Hz7uVKEwC8RZ1Qted1xgFfh60qyd6BlIO2TLZBNptCCKDlLzTIV Mh7GknNMLRGBx63gZKP0GlpFbeqLLx6ItYgSMSeDPuXPFnGnrLmcjv+DPnTYL9jWp41KLhDX6gwIn +SHh/XfQTlejFP/Fwt8I8WT602eJMks6DMO+Wx0Y+kiPRge6nYQFeIfj66G15thQ3kdI75NWJAwiA 9oQfp6KQ==; Received: from [50.53.46.231] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qw61v-00F3QG-00; Thu, 26 Oct 2023 19:28:31 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Chuck Lever , Jeff Layton , linux-nfs@vger.kernel.org, Amir Goldstein , Christian Brauner , Alexander Viro , linux-fsdevel@vger.kernel.org Subject: [PATCH] exportfs: handle CONFIG_EXPORTFS=m also Date: Thu, 26 Oct 2023 12:28:30 -0700 Message-ID: <20231026192830.21288-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 26 Oct 2023 12:28:56 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780847517978779032 X-GMAIL-MSGID: 1780847517978779032 When CONFIG_EXPORTFS=m, there are multiple build errors due to the header not handling the =m setting correctly. Change the header file to check for CONFIG_EXPORTFS enabled at all instead of just set =y. Fixes: dfaf653dc415 ("exportfs: make ->encode_fh() a mandatory method for NFS export") Signed-off-by: Randy Dunlap Cc: Chuck Lever Cc: Jeff Layton Cc: linux-nfs@vger.kernel.org Cc: Amir Goldstein Cc: Christian Brauner Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org --- include/linux/exportfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -- a/include/linux/exportfs.h b/include/linux/exportfs.h --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h @@ -314,7 +314,7 @@ extern struct dentry *exportfs_decode_fh /* * Generic helpers for filesystems. */ -#ifdef CONFIG_EXPORTFS +#if IS_ENABLED(CONFIG_EXPORTFS) int generic_encode_ino32_fh(struct inode *inode, __u32 *fh, int *max_len, struct inode *parent); #else