NFSv4: Initialise connection to the server in nfs4_alloc_client()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 9 Jun 2021 14:04:46 +0000 (10:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:05:50 +0000 (16:05 +0200)
commitff4023d0194263a0827c954f623c314978cf7ddd
tree28f8b6fa43fa523e2e9382cf4d29202c3214cc2b
parent36291fd6279ff8cea85141ce6bfe29614b9ef401
NFSv4: Initialise connection to the server in nfs4_alloc_client()

[ Upstream commit dd99e9f98fbf423ff6d365b37a98e8879170f17c ]

Set up the connection to the NFSv4 server in nfs4_alloc_client(), before
we've added the struct nfs_client to the net-namespace's nfs_client_list
so that a downed server won't cause other mounts to hang in the trunking
detection code.

Reported-by: Michael Wakabayashi <mwakabayashi@vmware.com>
Fixes: 5c6e5b60aae4 ("NFS: Fix an Oops in the pNFS files and flexfiles connection setup to the DS")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4client.c