OSDN Git Service

nfs: lift setting mount_info from nfs4_remote{,_referral}_mount
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 10 Dec 2019 12:30:51 +0000 (07:30 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 15 Jan 2020 15:15:16 +0000 (10:15 -0500)
commit7643c12e955740ac08abcd159f4205cf0c3eef4e
tree662091e68e00e64902670f635c3275f4c2ca54a2
parentd0b779d47c92fa17a31cde312d05155941e26651
nfs: lift setting mount_info from nfs4_remote{,_referral}_mount

Do that (fhandle allocation, setting struct server up) in
nfs4_referral_mount() and nfs4_try_mount() resp. and pass the
server and pointer to mount_info into nfs_do_root_mount() so that
nfs4_remote_referral_mount()/nfs_remote_mount() could be merged.

Since we are moving stuff from ->mount() instances to the points
prior to vfs_kern_mount() that would trigger those, we need to
make sure that do_nfs_root_mount() will do the corresponding
cleanup itself if it doesn't trigger those ->mount() instances.

Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4super.c