Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2132119ybc; Wed, 20 Nov 2019 09:21:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwcvZ6g1C/XrXR5Sr8PXzeUZq3gXjEQsHLppMaZIxPHPOS+zfYmVEC+p90X3knPlN9WWQ+O X-Received: by 2002:a17:906:11cd:: with SMTP id o13mr6560761eja.272.1574270507716; Wed, 20 Nov 2019 09:21:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574270507; cv=none; d=google.com; s=arc-20160816; b=I4Mof8zhqrUIQeVLtZ7KXzjSV+F/o2t91ARobcmUFRg+fRcB6N2eXfOoyXSRdmMVxf HYnohHzuJFBNmz0sdC5rz9yg/+jqZhqbasbZqmObKLyg20ZNhpIEMCPM4wrXw6NnwkTA 4Dtr+ju/N8KaqgDMXnB49/NHm6/Y9vUyQ/V6fnJuprG5chEUSnIcmQUr+olySagC6RJO GMQ0KfiYT/AHCoCbtdDNSNAmNXTiM5GkLlRRUxGriYKxzsXRbJGbEJdv5lrD/uF4CV5D 9w5Fowzzn3fFi1BbakNCdfhFub4km65qcMJGWw+mOj5pwo/kUZlFMypQgWemJ4Zw4Rel plgA== 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=nXyRYvfwK/kBenxMc4uS9ozCNJSMrMs8976Ao0xrGbo=; b=PibGJYvyl2mKOaK/0An6/bl7PinyX+nSL//jOUIk1wyp73US462Z7ZHktSOSDDORd4 tAnTssZkGntBJ9TnWufAotNC6cLrxqs76EkGpglv8pgeCf6zYXfurfjIgY06uoUPRe3a YzHoORm/tZDyIDNxi4xStN5Wqqet5GA1Y/r+eLQ0XlKCVcHz8jZyI3tACQKoHhyfJvow CDY0mWCx9bl9CnQNqmEocoNukPkgs7fry6wuyWZxr4uL1Dk6r9iQVO1bx4wlrB//DlAk A1T54jAHTbui5lqyDjrDyXmfM4N0GNsvCcpvYTzGoQf+D7rqGb460GOrWYafionriUb1 XHLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IQLoh5x6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 f10si15314690ejr.129.2019.11.20.09.21.21; Wed, 20 Nov 2019 09:21:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=IQLoh5x6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1729061AbfKTP14 (ORCPT + 99 others); Wed, 20 Nov 2019 10:27:56 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:30912 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728184AbfKTP1z (ORCPT ); Wed, 20 Nov 2019 10:27:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574263674; 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=nXyRYvfwK/kBenxMc4uS9ozCNJSMrMs8976Ao0xrGbo=; b=IQLoh5x6EokSkx1O5xfzq9jjPEQJuCcjxDgJS+TJQQjLE/1PX2WLLvjic1bV+Q2ax7i9gm LFZ0tExr63hr5BLzuWPo37VdDUr1iMeOKEwKxPlHFhijkvWdrwGr1iJuvJGqJaIJkUQbWU VCOueJN1jmm652+1/dY97XT2LPfwRBk= 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-182-nf2ln5XfNOymqlXJs0x0iA-1; Wed, 20 Nov 2019 10:27:52 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 921CA802698; Wed, 20 Nov 2019 15:27:51 +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 7276A5C1D4; Wed, 20 Nov 2019 15:27:51 +0000 (UTC) Received: by coeurl.usersys.redhat.com (Postfix, from userid 1000) id 4DB3B2099A; Wed, 20 Nov 2019 10:27:50 -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 Subject: [PATCH v5 08/27] nfs: stash nfs_subversion reference into nfs_mount_info Date: Wed, 20 Nov 2019 10:27:31 -0500 Message-Id: <20191120152750.6880-9-smayhew@redhat.com> In-Reply-To: <20191120152750.6880-1-smayhew@redhat.com> References: <20191120152750.6880-1-smayhew@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: nf2ln5XfNOymqlXJs0x0iA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro That will allow to get rid of passing those references around in quite a few places. Moreover, that will allow to merge xdev and remote file_system_type. Reviewed-by: David Howells Signed-off-by: Al Viro --- fs/nfs/internal.h | 1 + fs/nfs/namespace.c | 6 +++--- fs/nfs/nfs4super.c | 1 + fs/nfs/super.c | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 8eb79f104a7d..e7fd747d11a2 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -142,6 +142,7 @@ struct nfs_mount_info { =09struct nfs_clone_mount *cloned; =09struct nfs_server *server; =09struct nfs_fh *mntfh; +=09struct nfs_subversion *nfs_mod; }; =20 extern int nfs_mount(struct nfs_mount_request *info); diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index 7c78e6956639..0d0587ed7d94 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c @@ -233,8 +233,8 @@ struct vfsmount *nfs_do_submount(struct dentry *dentry,= struct nfs_fh *fh, =09=09.set_security =3D nfs_clone_sb_security, =09=09.cloned =3D &mountdata, =09=09.mntfh =3D fh, +=09=09.nfs_mod =3D NFS_SB(sb)->nfs_client->cl_nfs_mod, =09}; -=09struct nfs_subversion *nfs_mod =3D NFS_SB(sb)->nfs_client->cl_nfs_mod; =09struct nfs_server *server; =09struct vfsmount *mnt; =09char *page =3D (char *) __get_free_page(GFP_USER); @@ -243,8 +243,8 @@ struct vfsmount *nfs_do_submount(struct dentry *dentry,= struct nfs_fh *fh, =09if (page =3D=3D NULL) =09=09return ERR_PTR(-ENOMEM); =20 -=09server =3D nfs_mod->rpc_ops->clone_server(NFS_SB(sb), fh, -=09=09=09=09=09=09fattr, authflavor); +=09server =3D mount_info.nfs_mod->rpc_ops->clone_server(NFS_SB(sb), fh, +=09=09=09=09=09=09=09 fattr, authflavor); =09if (IS_ERR(server)) =09=09return ERR_CAST(server); =20 diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index 91ba1b6741dc..88d83cab8e9b 100644 --- a/fs/nfs/nfs4super.c +++ b/fs/nfs/nfs4super.c @@ -248,6 +248,7 @@ static struct dentry *nfs4_referral_mount(struct file_s= ystem_type *fs_type, =09=09.fill_super =3D nfs_fill_super, =09=09.set_security =3D nfs_clone_sb_security, =09=09.cloned =3D data, +=09=09.nfs_mod =3D &nfs_v4, =09}; =09struct dentry *res; =20 diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 32d2ec237c57..20de67933527 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -2761,6 +2761,7 @@ struct dentry *nfs_fs_mount(struct file_system_type *= fs_type, =09=09mntroot =3D ERR_CAST(nfs_mod); =09=09goto out; =09} +=09mount_info.nfs_mod =3D nfs_mod; =20 =09mntroot =3D nfs_mod->rpc_ops->try_mount(flags, dev_name, &mount_info, n= fs_mod); =20 --=20 2.17.2