From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B81CAC2D0BF for ; Tue, 10 Dec 2019 12:33:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E06F20838 for ; Tue, 10 Dec 2019 12:33:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="f2XuKygN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727569AbfLJMdJ (ORCPT ); Tue, 10 Dec 2019 07:33:09 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52619 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727505AbfLJMbX (ORCPT ); Tue, 10 Dec 2019 07:31:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575981082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XxEX7wEHWkbRhZaxvYab+tKzaTycjPdOhUXQjnzVqf0=; b=f2XuKygNQwwFLcOPMaxnRQZc4QQeZ3zP1e6Ii2XpNxcPGnycZ+P9yIueNNQAF44PlU8KIm u2VvP8v0HkyEgTsDAlKERkGokbiqHaGIPF8qekktKB6JrqfBZbNMuZ9IWrkdPsNKgu1xcs AsGnT6V6YE06LwEIZ8nnGN2ZF3JdOsY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-227-GYGKWjL3OfuxJDfm07ET6A-1; Tue, 10 Dec 2019 07:31:18 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1E974800D5B; Tue, 10 Dec 2019 12:31:17 +0000 (UTC) Received: from coeurl.usersys.redhat.com (ovpn-123-90.rdu2.redhat.com [10.10.123.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF43E60BE1; Tue, 10 Dec 2019 12:31:16 +0000 (UTC) Received: by coeurl.usersys.redhat.com (Postfix, from userid 1000) id A567320BC4; Tue, 10 Dec 2019 07:31:15 -0500 (EST) From: Scott Mayhew To: anna.schumaker@netapp.com, trond.myklebust@hammerspace.com Cc: dhowells@redhat.com, viro@zeniv.linux.org.uk, linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: [PATCH v6 05/27] nfs: don't bother setting/restoring export_path around do_nfs_root_mount() Date: Tue, 10 Dec 2019 07:30:53 -0500 Message-Id: <20191210123115.1655-6-smayhew@redhat.com> In-Reply-To: <20191210123115.1655-1-smayhew@redhat.com> References: <20191210123115.1655-1-smayhew@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: GYGKWjL3OfuxJDfm07ET6A-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: From: Al Viro nothing in it will be looking at that thing anyway Reviewed-by: David Howells Signed-off-by: Al Viro --- fs/nfs/nfs4super.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index 54dbb4561ccc..8146edf4ce3a 100644 --- a/fs/nfs/nfs4super.c +++ b/fs/nfs/nfs4super.c @@ -233,12 +233,10 @@ struct dentry *nfs4_try_mount(int flags, const char *= dev_name, =09dfprintk(MOUNT, "--> nfs4_try_mount()\n"); =20 =09export_path =3D data->nfs_server.export_path; -=09data->nfs_server.export_path =3D "/"; =09root_mnt =3D nfs_do_root_mount( =09=09=09nfs4_create_server(mount_info, &nfs_v4), =09=09=09flags, mount_info, =09=09=09data->nfs_server.hostname); -=09data->nfs_server.export_path =3D export_path; =20 =09res =3D nfs_follow_remote_path(root_mnt, export_path); =20 @@ -271,12 +269,10 @@ static struct dentry *nfs4_referral_mount(struct file= _system_type *fs_type, =09=09return ERR_PTR(-ENOMEM); =20 =09export_path =3D data->mnt_path; -=09data->mnt_path =3D "/"; =09root_mnt =3D nfs_do_root_mount( =09=09=09nfs4_create_referral_server(mount_info.cloned, =09=09=09=09=09=09 mount_info.mntfh), =09=09=09flags, &mount_info, data->hostname); -=09data->mnt_path =3D export_path; =20 =09res =3D nfs_follow_remote_path(root_mnt, export_path); =09dprintk("<-- nfs4_referral_mount() =3D %d%s\n", --=20 2.17.2