Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5343492ybl; Tue, 10 Dec 2019 04:34:30 -0800 (PST) X-Google-Smtp-Source: APXvYqyqdar63PEmfxGh/aH7pBNUylRjPXp/npg3mZOQuDg1v/8JLqwKNu1WyzRTg8iQUD1kSuQT X-Received: by 2002:a9d:7984:: with SMTP id h4mr20808545otm.297.1575981270260; Tue, 10 Dec 2019 04:34:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575981270; cv=none; d=google.com; s=arc-20160816; b=t9BHj7/eFHokWKShxOdt6380dblucCvTpNDrQUBIdnqwb+pWobFhPqCf6OQLn/CVQD 0YO4+ovzDJvUCcJQ6z8Xsn06g0/y1MnGZZ9yXiTDzPMyPMoryERYXz8DrExsU7S+Tn24 qXY42Tj0mIlUq/g14PEoZRxAWaeYqDbB4rU935NjLFiyXHKAcmscD4JLza6AA09IF/cI Us++uIa1I/NQDz18VbHhnAN5s6+2shMLokVCYIcWA3fGBNklTssQgM70h1XVNSZK9NJv g5BHATeZxC5dEx/z2datW1sjDEQaM5QzkvHAL9W8Qh6qUN2aMT10L0jbhOw1+sXFQ3Fb 1Prg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=XxEX7wEHWkbRhZaxvYab+tKzaTycjPdOhUXQjnzVqf0=; b=a/T3YsplNaC2y5H5CugR8P/EsXe/HYl9JrK8nEBelyoRleIP5RNdq9Qhnh51Yu9w8t YmD0l1WG7O9SFbAokHnjXvZWP99CMy6SsFKGG0IDlXWOrQH4DpeEQNJ/pygFTJ0hecIZ cCdoYLk5WlutybGcabmgAgjOPpRnIEOgT6y2ZAUjjzqpIXggy8coByjBES5HY7BytRPg r2uzz/bTBNWzG3SGC0TEiyO9yhimwpvTFMeDTRVFV2jtoJBobsbAqTrkMX04SwRcT8Xo xNvErkS3zMFLfcwdRRFdfLdk4ffH4j6kp1DRRT6tLreoprgP+8B+UFh5OTpORw7gZ3+C pYyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f2XuKygN; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6si1767728otq.95.2019.12.10.04.34.19; Tue, 10 Dec 2019 04:34:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f2XuKygN; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727506AbfLJMdo (ORCPT + 99 others); Tue, 10 Dec 2019 07:33:44 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:45390 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727508AbfLJMbX (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: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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