mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
NFS: Remove unused function nfs_umount
nfs_umount() has been unused since 2013's
commit 4580a92d44 ("NFS: Use server-recommended security flavor by
default (NFSv3)")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://lore.kernel.org/r/20250218215250.263709-1-linux@treblig.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
committed by
Trond Myklebust
parent
48693d119b
commit
3b3bc9a1f7
@@ -207,7 +207,6 @@ struct nfs_mount_request {
|
||||
};
|
||||
|
||||
extern int nfs_mount(struct nfs_mount_request *info, int timeo, int retrans);
|
||||
extern void nfs_umount(const struct nfs_mount_request *info);
|
||||
|
||||
/* client.c */
|
||||
extern const struct rpc_program nfs_program;
|
||||
|
||||
@@ -223,74 +223,6 @@ int nfs_mount(struct nfs_mount_request *info, int timeo, int retrans)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/**
|
||||
* nfs_umount - Notify a server that we have unmounted this export
|
||||
* @info: pointer to umount request arguments
|
||||
*
|
||||
* MOUNTPROC_UMNT is advisory, so we set a short timeout, and always
|
||||
* use UDP.
|
||||
*/
|
||||
void nfs_umount(const struct nfs_mount_request *info)
|
||||
{
|
||||
static const struct rpc_timeout nfs_umnt_timeout = {
|
||||
.to_initval = 1 * HZ,
|
||||
.to_maxval = 3 * HZ,
|
||||
.to_retries = 2,
|
||||
};
|
||||
struct rpc_create_args args = {
|
||||
.net = info->net,
|
||||
.protocol = IPPROTO_UDP,
|
||||
.address = (struct sockaddr *)info->sap,
|
||||
.addrsize = info->salen,
|
||||
.timeout = &nfs_umnt_timeout,
|
||||
.servername = info->hostname,
|
||||
.program = &mnt_program,
|
||||
.version = info->version,
|
||||
.authflavor = RPC_AUTH_UNIX,
|
||||
.flags = RPC_CLNT_CREATE_NOPING,
|
||||
.cred = current_cred(),
|
||||
};
|
||||
struct rpc_message msg = {
|
||||
.rpc_argp = info->dirpath,
|
||||
};
|
||||
struct rpc_clnt *clnt;
|
||||
int status;
|
||||
|
||||
if (strlen(info->dirpath) > MNTPATHLEN)
|
||||
return;
|
||||
|
||||
if (info->noresvport)
|
||||
args.flags |= RPC_CLNT_CREATE_NONPRIVPORT;
|
||||
|
||||
clnt = rpc_create(&args);
|
||||
if (IS_ERR(clnt))
|
||||
goto out_clnt_err;
|
||||
|
||||
dprintk("NFS: sending UMNT request for %s:%s\n",
|
||||
(info->hostname ? info->hostname : "server"), info->dirpath);
|
||||
|
||||
if (info->version == NFS_MNT3_VERSION)
|
||||
msg.rpc_proc = &clnt->cl_procinfo[MOUNTPROC3_UMNT];
|
||||
else
|
||||
msg.rpc_proc = &clnt->cl_procinfo[MOUNTPROC_UMNT];
|
||||
|
||||
status = rpc_call_sync(clnt, &msg, 0);
|
||||
rpc_shutdown_client(clnt);
|
||||
|
||||
if (unlikely(status < 0))
|
||||
goto out_call_err;
|
||||
|
||||
return;
|
||||
|
||||
out_clnt_err:
|
||||
dprintk("NFS: failed to create UMNT RPC client, status=%ld\n",
|
||||
PTR_ERR(clnt));
|
||||
return;
|
||||
|
||||
out_call_err:
|
||||
dprintk("NFS: UMNT request failed, status=%d\n", status);
|
||||
}
|
||||
|
||||
/*
|
||||
* XDR encode/decode functions for MOUNT
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user