From patchwork Thu Nov 17 19:11:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 21879 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp577576wrr; Thu, 17 Nov 2022 11:14:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf7U09O0VbXxkLncyMZzUY0Jh7FFSO3zpEsHD6e3MN4borzEn2hE5EeKfoW+4uGRma9f2NjF X-Received: by 2002:a17:906:e21a:b0:7a1:e4c2:fb0b with SMTP id gf26-20020a170906e21a00b007a1e4c2fb0bmr3319486ejb.464.1668712497124; Thu, 17 Nov 2022 11:14:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668712497; cv=none; d=google.com; s=arc-20160816; b=cOQVG6PXwV10Im7wbk0a0SWdawOqRkhvNWV7TgLePSHPOdAlMWktf9OWpfgvIXwDxx a5iCnmhyS1yxgc+2Nx+xCZqu1a3nDHfu0hwqz+hffvmwlqC02cuew7KRlfLyZX+jqbfF 1tvXir6II1jMpHle24bNsCecReyzzkyA9XQOSH7N5Hj8pkiwdmvl0Ad/QcZJcbxLarco 3xUaZLrgJ0fmJ9AVYieG5/KmqKOSR7maT+DXttoqJd+zatV1QTnfKdGD0UTRPnuY1I87 jsVE8Lt4OXCAUE+I7OMYNaHuwsLbpt8TTduohZ7wqZCaJiLTBmZ6CvVnni2KRk9bc14O um0Q== 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=QR0/lKEZnaThVPieVeCchFgTpddjH7qsjQ88VzoxFKY=; b=x6m4C3QcQfhiS5Og4bvimsxokLkp5jhlWRa5OaWRyFImSo6na66z5uuN9E5Wx2teSF ffvHBfcv4WmvEEOcZ0X+xKO2hkfYnfpCE5a+Y0AaVbEMIzPHlEmAig45oWH+hgv2YzSr Rc7MmOf3rfldNDTIkgg6rEPKClp+uT6BzeCeXS60PDZlGR0w/Vf+4/WlYDwFYDlmkeVo W0/qtkY/FkNkFz+zT/2k0MkrCYRiTQNalOrSaTOPaR9EMW+dulAj5KA1STvRhZI2+rOX +6FFEK7krgbMWxrg2gX7V77XIZfCNRPgTDs5R/aMwVeq1rqwhmx/W+tPn7hzzZL+Osr8 kUcQ== 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 v16-20020a056402175000b00462352ef503si1398676edx.518.2022.11.17.11.14.32; Thu, 17 Nov 2022 11:14:57 -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 S240450AbiKQTMR (ORCPT + 99 others); Thu, 17 Nov 2022 14:12:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240555AbiKQTMM (ORCPT ); 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 61D0287567; 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 953E963E516C; 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 2d-a3it2RGeZ; Thu, 17 Nov 2022 20:12:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 4A76063E516F; 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 10026) with ESMTP id uDGT4ROq8FZk; Thu, 17 Nov 2022 20:12:08 +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 C32F463E516B; Thu, 17 Nov 2022 20:12:07 +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, Richard Weinberger Subject: [PATCH 2/3] fs: namei: Allow follow_down() to uncover auto mounts Date: Thu, 17 Nov 2022 20:11:50 +0100 Message-Id: <20221117191151.14262-3-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 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?1749771875102198394?= X-GMAIL-MSGID: =?utf-8?q?1749771875102198394?= 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 --- fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/namei.c b/fs/namei.c index 578c2110df02..000c4b84e6be 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1462,7 +1462,7 @@ int follow_down(struct path *path) { struct vfsmount *mnt = path->mnt; bool jumped; - int ret = traverse_mounts(path, &jumped, NULL, 0); + int ret = traverse_mounts(path, &jumped, NULL, LOOKUP_AUTOMOUNT); if (path->mnt != mnt) mntput(mnt);