From nobody Fri Dec 19 06:17:48 2025 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 794281D9587; Tue, 18 Feb 2025 22:31:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739917869; cv=none; b=dKdcgGozN2tUEpurrhTOjstUktnfH6gK1JRqeTdykUmb1ggby3dPNLI6aKBTuj4e8MgQUZVrPPAeuZ719WdvRNyG0bawWBvBVhS283SsYs1CxdWbiM53On67vw66SVDOi65knBO0JQY8cffY+O673nlpIadhewED0paualp4DI0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739917869; c=relaxed/simple; bh=QrexZmZp5Pa+qGgO2/S3nAg6IHlh6SMfpEqr89qoqyA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SBvi6IrUoj3yzJfhE6/svIlB0fIBqsFbzxxTan8vAcKEEDKoJ+i74qKVWecck8OytKDrY9ckQJAcz5SxP5wR1i774piN1TLrZ/86fmn8Mkot7ZFQf+cKDyuIKhjfOLvcWinLs+BVUC61endvzBIlGwatvswxjg/02k/TUpWXLnM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=i3zglil0; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="i3zglil0" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=uFEZd17Q2NrrbJs8WKzmWUXkQNoKRppRgUwSdcJH8/A=; b=i3zglil07rpiSapd PdMbBC02A1C9F2/tBNyRDEIV1p36u6b4xdqSJyAAKUHVk/Oj21wagH4p6Bhk3dEZ/FuyOnC5/RVvw YrSZhddB3UnVnPxX2j6v+pUxLVUyDRtp3NBhB+xSd2qTC7c+LOd49UJezZoAUqpNJyXRvamE5Sj0n hcqE1iEY83gGWemG5ISfYWkCfq4AUM3Qf8L/hoMDbI6Pt3ix0O/66UUN2Ol2YULdFbb0GGBAs8okx OPfwoXCPKpTmYW2sMVLid4KcopH5xwQ6T/ESqQ0DvalnPxYZAtYYBlBOABkRBmoVc1Qo/lf+PYPSh YvNdH2QEl1fLpNsszw==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1tkVWN-00GkMP-2Y; Tue, 18 Feb 2025 21:52:51 +0000 From: linux@treblig.org To: trondmy@kernel.org, anna@kernel.org, linux-nfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH] NFS: Remove unused function nfs_umount Date: Tue, 18 Feb 2025 21:52:50 +0000 Message-ID: <20250218215250.263709-1-linux@treblig.org> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" nfs_umount() has been unused since 2013's commit 4580a92d44e2 ("NFS: Use server-recommended security flavor by default (NFSv3)") Remove it. Signed-off-by: Dr. David Alan Gilbert --- fs/nfs/internal.h | 1 - fs/nfs/mount_clnt.c | 68 --------------------------------------------- 2 files changed, 69 deletions(-) diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index fae2c7ae4acc..36dcbb928c5f 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -207,7 +207,6 @@ struct nfs_mount_request { }; =20 extern int nfs_mount(struct nfs_mount_request *info, int timeo, int retran= s); -extern void nfs_umount(const struct nfs_mount_request *info); =20 /* client.c */ extern const struct rpc_program nfs_program; diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 57c9dd700b58..db8dfb920394 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c @@ -223,74 +223,6 @@ int nfs_mount(struct nfs_mount_request *info, int time= o, int retrans) goto out; } =20 -/** - * 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 =3D { - .to_initval =3D 1 * HZ, - .to_maxval =3D 3 * HZ, - .to_retries =3D 2, - }; - struct rpc_create_args args =3D { - .net =3D info->net, - .protocol =3D IPPROTO_UDP, - .address =3D (struct sockaddr *)info->sap, - .addrsize =3D info->salen, - .timeout =3D &nfs_umnt_timeout, - .servername =3D info->hostname, - .program =3D &mnt_program, - .version =3D info->version, - .authflavor =3D RPC_AUTH_UNIX, - .flags =3D RPC_CLNT_CREATE_NOPING, - .cred =3D current_cred(), - }; - struct rpc_message msg =3D { - .rpc_argp =3D info->dirpath, - }; - struct rpc_clnt *clnt; - int status; - - if (strlen(info->dirpath) > MNTPATHLEN) - return; - - if (info->noresvport) - args.flags |=3D RPC_CLNT_CREATE_NONPRIVPORT; - - clnt =3D 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 =3D=3D NFS_MNT3_VERSION) - msg.rpc_proc =3D &clnt->cl_procinfo[MOUNTPROC3_UMNT]; - else - msg.rpc_proc =3D &clnt->cl_procinfo[MOUNTPROC_UMNT]; - - status =3D 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=3D%ld\n", - PTR_ERR(clnt)); - return; - -out_call_err: - dprintk("NFS: UMNT request failed, status=3D%d\n", status); -} - /* * XDR encode/decode functions for MOUNT */ --=20 2.48.1