NFS: drop useless LIST_HEAD
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 23 Dec 2018 08:57:10 +0000 (09:57 +0100)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 20 Feb 2019 22:33:55 +0000 (17:33 -0500)
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@lip6.fr>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs4client.c

index 170115fc43c54f1ef44ba5ebd017bdd9bb6dfbe4..1339ede979afd5e3dfcb0d3a371dea41d01696b4 100644 (file)
@@ -151,7 +151,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,