From patchwork Wed Dec 7 08:43:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 30696 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp59477wrr; Wed, 7 Dec 2022 00:45:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf7j+3J9YsIuVkV3clb6z4q5rdWl1DDagY9mr5vZmJfZZCvZaA0lSSYKO06me964L0+5HL/K X-Received: by 2002:a17:902:7898:b0:188:584d:b6d4 with SMTP id q24-20020a170902789800b00188584db6d4mr74016602pll.170.1670402722143; Wed, 07 Dec 2022 00:45:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670402722; cv=none; d=google.com; s=arc-20160816; b=fWj35w0IaE7BZ2BEhRbp8OaoRC8S2GCEovR3CLA3T3JBgt++g9Xb/wwfexLcclNvL+ w2QRLF6/7vwthQEhBwUSCdBPsZErf+vKLYDXX9N2vD8ZDMLMH0ItLxxvnRI82lva8uvg t1ThBpJfBQdpU+5mJAiJ+ysVkrbd7HDV+Ax8hf/CHbDKH2YD8ug5SW/AfG7NKbSkR3X6 NRwVipgmSDsOSdWjxr+05htW3GOxwOOBwR99n8isbKaVRtsc1dAcsbfB0wG6l8EL8rRW TexdBelnPUFUmOlQpjIskQFYrRaQVyXPZhzoHJJ4Ci68gPOf3wnvPj9fFo0GEs2+8dg2 YV/w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=7J3Cf5V8jVpa8RhPn5NeaoBF71EbfxWm8CfazAJHL44=; b=E80cLfOwWBPi/gxPVJygY2VD/XruPHnn8Wig6tVxqFW4L5VqeWIwCI3GNyFXuSVfVK /8gmdUcpZNDQjPNb9Kxsci9TH2EZJQv0vf/g0Y2V2aC4UKq94eOgXDhc/zShzeDG4uNz zu7L19munuARWcPOL2F+YlVP3DEp+HTYDWCxr0wMOHwTg0aZDdSphE2hFfZiil13B8IC eJTlnsN3fSVyl/h+uZYW5FDkWXHWq1HjnA/OBlt6AJLhNHk2X6MXwKMzDeK5c0VyTkgV HtmATDySWPbtciebkrsOgRTvkLKkMO1sQTicIk1cGcJs/iGYTDAC6OfrErjZEGhTByk5 f8uw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v6-20020a170902b7c600b001782a6fbc7csi18289863plz.463.2022.12.07.00.45.08; Wed, 07 Dec 2022 00:45:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229546AbiLGInc (ORCPT + 99 others); Wed, 7 Dec 2022 03:43:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbiLGIna (ORCPT ); Wed, 7 Dec 2022 03:43:30 -0500 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99751AE6C; Wed, 7 Dec 2022 00:43:27 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id C919064BA9DB; Wed, 7 Dec 2022 09:43:24 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id eZ5PZuGXfVPK; Wed, 7 Dec 2022 09:43:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 7098F64BA9DA; Wed, 7 Dec 2022 09:43:24 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qyypJqZOdzsx; Wed, 7 Dec 2022 09:43:24 +0100 (CET) Received: from blindfold.corp.sigma-star.at (unknown [82.150.214.1]) by lithops.sigma-star.at (Postfix) with ESMTPSA id E3AA064BA9B1; Wed, 7 Dec 2022 09:43:23 +0100 (CET) From: Richard Weinberger To: linux-nfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, jlayton@kernel.org, chuck.lever@oracle.com, anna@kernel.org, trond.myklebust@hammerspace.com, viro@zeniv.linux.org.uk, raven@themaw.net, chris.chilvers@appsbroker.com, david.young@appsbroker.com, luis.turcitu@appsbroker.com, david@sigma-star.at, benmaynard@google.com, Richard Weinberger Subject: [PATCH 1/3] NFSD: Teach nfsd_mountpoint() auto mounts Date: Wed, 7 Dec 2022 09:43:07 +0100 Message-Id: <20221207084309.8499-2-richard@nod.at> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20221207084309.8499-1-richard@nod.at> References: <20221207084309.8499-1-richard@nod.at> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751544204540917320?= X-GMAIL-MSGID: =?utf-8?q?1751544204540917320?= Currently nfsd_mountpoint() tests for mount points using d_mountpoint(), this works only when a mount point is already uncovered. In our case the mount point is of type auto mount and can be coverted. i.e. ->d_automount() was not called. Using d_managed() nfsd_mountpoint() can test whether a mount point is either already uncovered or can be uncovered later. Signed-off-by: Richard Weinberger --- fs/nfsd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index f650afedd67f..157f0df0e93a 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -160,7 +160,7 @@ int nfsd_mountpoint(struct dentry *dentry, struct svc_export *exp) return 1; if (nfsd4_is_junction(dentry)) return 1; - if (d_mountpoint(dentry)) + if (d_managed(dentry)) /* * Might only be a mountpoint in a different namespace, * but we need to check. From patchwork Wed Dec 7 08:43:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 30699 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp59671wrr; Wed, 7 Dec 2022 00:45:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf4b2iGNy5YTWC+EePLrTF60oX6VChvVPw92/srbTMaWG4YQilq2L7dvTmSFKT6hIDHofBXo X-Received: by 2002:a17:902:c115:b0:189:c9ac:7428 with SMTP id 21-20020a170902c11500b00189c9ac7428mr18391022pli.159.1670402749153; Wed, 07 Dec 2022 00:45:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670402749; cv=none; d=google.com; s=arc-20160816; b=c/l/GSk/nDze4eSVqIgo0c95Cco9EAEgiUR/AFMvvdAvkE+gNHDqK7Z5jbm+L+uYyn w8gzVGH5T0g8kH2RLmeGQZww92H2syfyj3frrPxmY+rHE6pkrHhCEpAsLa9F9GuellK3 b4dHDgg/NrPS3STYbq7awk11qK1tn6LCuaPZXOuQBDQ0ahOn34J4p+VMSv/chRaFok2G JEiHNad8nWw/krLy+obnyxnbkryK63nvM33EWedaC0iPe8ZUxrrL6o2q7WvAeOjIyj+0 xZr2OMMLxBiXLPtGzFhKwiAsL+WInCKEoc0NNK6kPxdABMmgJqtWc+rldEeo6sHox5IE W3Hg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=U9wn3zADMgu2IIkfzXXbePNdCfJiTDl83ux/wXSTSE4=; b=XYFhIZlZCIN8sy2MZ5m8ng/IvGuoEIstqpLN1ZzzTXa3dsDiAkk3/kahCUvGXGMdIu HRUHi2/fUn0Wp7B/dfm0ogg2AXiJF1TvfgOPRZr1oqlqtZ/IuyIIGWed3Er8eeZYTyqs 3wC/sEO9K+3/F8BNpdC3hFYaLkssnzqjp2Uu7CdanDXZvPUqHEJdYBBzx+gTJVle0yMd K+XdSldHe2X2GHoU4CeMp0CXrYN8PHSXKBsvbAjO2kfiJKeQ/JDTsHaDHhHRjdgGXDpx BO7oiI/xwEsq/oiLxpCHiWepPgzPTeJxBi4tHaQZH9Sqx7YT/dTjzmUi7l5ZPzAGtugA 5nrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bk13-20020a056a02028d00b00478972b84d7si12889825pgb.249.2022.12.07.00.45.36; Wed, 07 Dec 2022 00:45:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229883AbiLGInl (ORCPT + 99 others); Wed, 7 Dec 2022 03:43:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiLGIna (ORCPT ); Wed, 7 Dec 2022 03:43:30 -0500 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 997D7B1CA; Wed, 7 Dec 2022 00:43:27 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 9EB3A64BA9D6; Wed, 7 Dec 2022 09:43:25 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id LY6Z9iYN4mWg; Wed, 7 Dec 2022 09:43:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 0CE646226232; Wed, 7 Dec 2022 09:43:25 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zw7q6RHb6S87; Wed, 7 Dec 2022 09:43:24 +0100 (CET) Received: from blindfold.corp.sigma-star.at (unknown [82.150.214.1]) by lithops.sigma-star.at (Postfix) with ESMTPSA id 6544E64BA9AE; Wed, 7 Dec 2022 09:43:24 +0100 (CET) From: Richard Weinberger To: linux-nfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, jlayton@kernel.org, chuck.lever@oracle.com, anna@kernel.org, trond.myklebust@hammerspace.com, viro@zeniv.linux.org.uk, raven@themaw.net, chris.chilvers@appsbroker.com, david.young@appsbroker.com, luis.turcitu@appsbroker.com, david@sigma-star.at, benmaynard@google.com, Richard Weinberger Subject: [PATCH 2/3] fs: namei: Allow follow_down() to uncover auto mounts Date: Wed, 7 Dec 2022 09:43:08 +0100 Message-Id: <20221207084309.8499-3-richard@nod.at> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20221207084309.8499-1-richard@nod.at> References: <20221207084309.8499-1-richard@nod.at> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751544233123165412?= X-GMAIL-MSGID: =?utf-8?q?1751544233123165412?= This function is only used by NFSD to cross mount points. If a mount point is of type auto mount, follow_down() will not uncover it. Add LOOKUP_AUTOMOUNT to the lookup flags to have ->d_automount() called when NFSD walks down the mount tree. Signed-off-by: Richard Weinberger Acked-by: Al Viro --- fs/namei.c | 6 +++--- fs/nfsd/vfs.c | 6 +++++- include/linux/namei.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 578c2110df02..a6bb6863bf0c 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1458,11 +1458,11 @@ EXPORT_SYMBOL(follow_down_one); * point, the filesystem owning that dentry may be queried as to whether the * caller is permitted to proceed or not. */ -int follow_down(struct path *path) +int follow_down(struct path *path, unsigned int flags) { struct vfsmount *mnt = path->mnt; bool jumped; - int ret = traverse_mounts(path, &jumped, NULL, 0); + int ret = traverse_mounts(path, &jumped, NULL, flags); if (path->mnt != mnt) mntput(mnt); @@ -2864,7 +2864,7 @@ int path_pts(struct path *path) path->dentry = child; dput(parent); - follow_down(path); + follow_down(path, 0); return 0; } #endif diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 157f0df0e93a..ced04fc2b947 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -63,9 +63,13 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp, struct dentry *dentry = *dpp; struct path path = {.mnt = mntget(exp->ex_path.mnt), .dentry = dget(dentry)}; + unsigned int follow_flags = 0; int err = 0; - err = follow_down(&path); + if (exp->ex_flags & NFSEXP_CROSSMOUNT) + follow_flags = LOOKUP_AUTOMOUNT; + + err = follow_down(&path, follow_flags); if (err < 0) goto out; if (path.mnt == exp->ex_path.mnt && path.dentry == dentry && diff --git a/include/linux/namei.h b/include/linux/namei.h index 00fee52df842..6f96db73a70a 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -77,7 +77,7 @@ struct dentry *lookup_one_positive_unlocked(struct user_namespace *mnt_userns, struct dentry *base, int len); extern int follow_down_one(struct path *); -extern int follow_down(struct path *); +extern int follow_down(struct path *, unsigned int flags); extern int follow_up(struct path *); extern struct dentry *lock_rename(struct dentry *, struct dentry *); From patchwork Wed Dec 7 08:43:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 30698 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp59632wrr; Wed, 7 Dec 2022 00:45:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf5c/pdh6MafccekEbES+zwWDhHUJxYRmHb3evm+hkiSxAirKqAgYbzm8/XwNswgY0B8eU1z X-Received: by 2002:a17:90a:2e0c:b0:218:c1d3:4cd8 with SMTP id q12-20020a17090a2e0c00b00218c1d34cd8mr78732299pjd.37.1670402742806; Wed, 07 Dec 2022 00:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670402742; cv=none; d=google.com; s=arc-20160816; b=a34c82evISALZ51a6i+ZGBCuOZVlL2lHCrGEb6L4dZIMBQfXTswqGELfujX+KjX8vr 2OncIfYQpEBLZHC9EGleovwUUHL2LZn+RnsnAO70X32mVKrBv/f5jju3SAZ/HPCEtMA7 1Y2Wmssk3r5Za0LD0NUnSgtR4SBEzyXJvu8zS8wrJd9FJv+wpDJHle6+ACLPcDjCU9AU srff7H+Cvda3uEHODmsOIfJzLl9Qs2GAfXZEY2iY/GRW9FOGTote7CC9j+j1izl+Y1++ ueN9TZsezk3G50Vb3QBJiGXg6Dm11sgW0hmXVejG4F+bcd/LhEK2O/Rt/R/5WjevJ8kN KlCA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=IOS6RKMqeVLSd+iJJkO/H605GXEyaZhD8544DqiztHM=; b=lIuP3R1JC6/TCF0sjmlgFJD4WXL/RsxTlhx9/V4y3tPlDuomrVGG2rFw4JLzKgH2hM ufCeX+hj119rkTGou3WF8VfjNBddXVDUrLEJAPrePHBbmTYwEPONA4/Gl75ZrTIGJQya bagCwF+HXkbL1Jj6UGKoO/38H4nMevu65tuqckxBNrY3qEk3wblc5LJPJLimy3kFeS2l 1WcyRsW1eVav9+NWJ/e3vZpaIXyfSmBj1j1N6ehOtI/tFuAytaVFPIk89YL1US3AE7lC 1EgqyiOFKbwxbh4BOzSW8fTeF+BqUb+sJ+KtJe2a4eM4eODruSnER+qtzl4b4hdGO1kq ejuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l1-20020a17090ac58100b002191e510e08si866391pjt.168.2022.12.07.00.45.30; Wed, 07 Dec 2022 00:45:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229834AbiLGIng (ORCPT + 99 others); Wed, 7 Dec 2022 03:43:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbiLGIna (ORCPT ); Wed, 7 Dec 2022 03:43:30 -0500 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99642AE56; Wed, 7 Dec 2022 00:43:27 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 02DD864BA9DA; Wed, 7 Dec 2022 09:43:26 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Uj5DSkEG5Sw5; Wed, 7 Dec 2022 09:43:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id AF7AF64BA9AE; Wed, 7 Dec 2022 09:43:25 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id QksFaxl55wz9; Wed, 7 Dec 2022 09:43:25 +0100 (CET) Received: from blindfold.corp.sigma-star.at (unknown [82.150.214.1]) by lithops.sigma-star.at (Postfix) with ESMTPSA id E753464BA9B1; Wed, 7 Dec 2022 09:43:24 +0100 (CET) From: Richard Weinberger To: linux-nfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, jlayton@kernel.org, chuck.lever@oracle.com, anna@kernel.org, trond.myklebust@hammerspace.com, viro@zeniv.linux.org.uk, raven@themaw.net, chris.chilvers@appsbroker.com, david.young@appsbroker.com, luis.turcitu@appsbroker.com, david@sigma-star.at, benmaynard@google.com, Richard Weinberger Subject: [PATCH 3/3] NFS: nfs_encode_fh: Remove S_AUTOMOUNT check Date: Wed, 7 Dec 2022 09:43:09 +0100 Message-Id: <20221207084309.8499-4-richard@nod.at> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20221207084309.8499-1-richard@nod.at> References: <20221207084309.8499-1-richard@nod.at> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751544226722944972?= X-GMAIL-MSGID: =?utf-8?q?1751544226722944972?= Now with NFSD being able to cross into auto mounts, the check can be removed. Signed-off-by: Richard Weinberger Acked-by: Anna Schumaker --- fs/nfs/export.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/export.c b/fs/nfs/export.c index 01596f2d0a1e..0a5ee1754d50 100644 --- a/fs/nfs/export.c +++ b/fs/nfs/export.c @@ -42,7 +42,7 @@ nfs_encode_fh(struct inode *inode, __u32 *p, int *max_len, struct inode *parent) dprintk("%s: max fh len %d inode %p parent %p", __func__, *max_len, inode, parent); - if (*max_len < len || IS_AUTOMOUNT(inode)) { + if (*max_len < len) { dprintk("%s: fh len %d too small, required %d\n", __func__, *max_len, len); *max_len = len;