Re: [PATCH 15/20] NFS: drop useless LIST_HEAD

From: Trond Myklebust
Date: Thu Feb 21 2019 - 17:40:59 EST


On Sun, 2018-12-23 at 09:57 +0100, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares has never
> been used.
>
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
> ... when != x
> // </smpl>
>
> Fixes: 0e20162ed1e9 ("NFSv4.1 Use MDS auth flavor for data server
> connection")
> Signed-off-by: Julia Lawall <Julia.Lawall@xxxxxxx>
>
> ---
> Successfully 0-day tested on 151 configurations.
>
> fs/nfs/nfs4client.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
> index 2548405da1f7..735c1056a91c 100644
> --- a/fs/nfs/nfs4client.c
> +++ b/fs/nfs/nfs4client.c
> @@ -145,7 +145,6 @@ static void
> nfs4_shutdown_ds_clients(struct nfs_client *clp)
> {
> struct nfs4_ds_server *dss;
> - LIST_HEAD(shutdown_list);
>
> while (!list_empty(&clp->cl_ds_clients)) {
> dss = list_entry(clp->cl_ds_clients.next,
>

Thanks Julia! Applied to my linux-next branch for inclusion in the 5.1
merge window.

--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@xxxxxxxxxxxxxxx