Message ID | 20221117191151.14262-2-richard@nod.at |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp577856wrr; Thu, 17 Nov 2022 11:15:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf4wwD0moLs5HqaeBbEG2wRYDyPcvz3F+SQ3AAc/SVAnuzP5uEGMhztUaBW0480w6m5uf9oW X-Received: by 2002:a17:906:17c9:b0:782:fd8e:9298 with SMTP id u9-20020a17090617c900b00782fd8e9298mr3324357eje.640.1668712532953; Thu, 17 Nov 2022 11:15:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668712532; cv=none; d=google.com; s=arc-20160816; b=wIFmBhA0NcWWc+20CCxxSW5W+YC06BgWZFhcx7hVhWN6Nh5x2ABMZsCVoFG88PGznK VmvCRdZRnwRolzRAuvWiYc6EUJQ9Ksc6QGhxaJ3v8ha7LqaXojBU5HS7QMPJMm/8ZCmP woDwflzXkxi0qEe7Z4t53leSzXUzbRxColz4rEWmCKBKa9zr2wowOJ1YHF8nNqEZm/JB gqftWtD2j3OLRMT6axn6EOgG2RwO8b7hHIjAVe1rdkILUxcaLRpRjfel5/a1/aSBx4OU k/gF7U2N2zJh3S6heIveSNlS2BkFxSD9S3/NigKwscII3Cz6SIvaoIvnFu41bM/bB7Bl ljyA== 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=QZoXrQOcpALcIGDNty689bGiDq5O/RanHTybH6XwMmLH3bSR6qQF0m7a66iUnEZEWC DzlJg2Ny7IMkqsro4zJkpmd7TPhJn+bkwFxe1pFCTdHXJkfQGijAZDcsY/Bgqev0hYx1 RTqyliTIwOomJqwnw9/tlmvkJLT6R661bbIVLYXUrXi8FgQ1LDz9Y8U+/T7fnH+TKYmR LM1pESkLF/KxNK+k+rFP8bkDtNaXsXnV4VMJjaplJAXTmzLZsUQ141T4AiH+xGeN098F i9ghjpPJe3IpME0G/uDt15RFnVeBmvTYmldgvN2uYDLBphTSAXxuYSS368tzKuwQ0u/m lLyA== 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 di12-20020a170906730c00b007470b52f94esi1409989ejc.199.2022.11.17.11.15.08; Thu, 17 Nov 2022 11:15:32 -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 S240607AbiKQTMU (ORCPT <rfc822;a1648639935@gmail.com> + 99 others); Thu, 17 Nov 2022 14:12:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240557AbiKQTMM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 Nov 2022 14:12:12 -0500 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61383606A1; Thu, 17 Nov 2022 11:12:10 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 6BD1663E5149; Thu, 17 Nov 2022 20:12:08 +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 Ki1dMyhX9hbu; Thu, 17 Nov 2022 20:12:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id C5E7463E516C; Thu, 17 Nov 2022 20:12:07 +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 O7S3p5HUjSNY; Thu, 17 Nov 2022 20:12:07 +0100 (CET) Received: from blindfold.corp.sigma-star.at (213-47-184-186.cable.dynamic.surfer.at [213.47.184.186]) by lithops.sigma-star.at (Postfix) with ESMTPSA id 4985B63E5149; Thu, 17 Nov 2022 20:12:07 +0100 (CET) From: Richard Weinberger <richard@nod.at> 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, Richard Weinberger <richard@nod.at> Subject: [PATCH 1/3] NFSD: Teach nfsd_mountpoint() auto mounts Date: Thu, 17 Nov 2022 20:11:49 +0100 Message-Id: <20221117191151.14262-2-richard@nod.at> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20221117191151.14262-1-richard@nod.at> References: <20221117191151.14262-1-richard@nod.at> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749771912498801251?= X-GMAIL-MSGID: =?utf-8?q?1749771912498801251?= |
Series |
NFS: NFSD: Allow crossing mounts when re-exporting
|
|
Commit Message
Richard Weinberger
Nov. 17, 2022, 7:11 p.m. UTC
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 <richard@nod.at>
---
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.