summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4client.c
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@Netapp.com>2021-10-14 13:55:05 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2021-10-20 18:09:54 -0400
commite5731131fb6fefaa69064ca511b7c4971d6cf54f (patch)
tree0bf83f6d8fea2aecab642e75633f9903f6b6756c /fs/nfs/nfs4client.c
parent01dde76e471229e3437a2686c572f4980b2c483e (diff)
NFS: Move nfs_probe_destination() into the generic client
And rename it to nfs_probe_server(). I also change it to take the nfs_fh as an argument so callers can choose what filehandle to probe. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/nfs4client.c')
-rw-r--r--fs/nfs/nfs4client.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index 3fb0ca92377c..85978ecb727e 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -1293,30 +1293,6 @@ error:
return ERR_PTR(error);
}
-/*
- * Grab the destination's particulars, including lease expiry time.
- *
- * Returns zero if probe succeeded and retrieved FSID matches the FSID
- * we have cached.
- */
-static int nfs_probe_destination(struct nfs_server *server)
-{
- struct inode *inode = d_inode(server->super->s_root);
- struct nfs_fattr *fattr;
- int error;
-
- fattr = nfs_alloc_fattr();
- if (fattr == NULL)
- return -ENOMEM;
-
- /* Sanity: the probe won't work if the destination server
- * does not recognize the migrated FH. */
- error = nfs_probe_fsinfo(server, NFS_FH(inode), fattr);
-
- nfs_free_fattr(fattr);
- return error;
-}
-
/**
* nfs4_update_server - Move an nfs_server to a different nfs_client
*
@@ -1377,5 +1353,5 @@ int nfs4_update_server(struct nfs_server *server, const char *hostname,
server->nfs_client->cl_hostname = kstrdup(hostname, GFP_KERNEL);
nfs_server_insert_lists(server);
- return nfs_probe_destination(server);
+ return nfs_probe_server(server, NFS_FH(d_inode(server->super->s_root)));
}