]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
NFS: remove __nfs_client_for_each_server
authorChristoph Hellwig <hch@lst.de>
Wed, 7 Jan 2026 07:26:52 +0000 (08:26 +0100)
committerAnna Schumaker <anna.schumaker@oracle.com>
Tue, 20 Jan 2026 19:49:45 +0000 (14:49 -0500)
__nfs_client_for_each_server is only called by
nfs_client_for_each_server, so merge the two.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs/super.c

index 57d372db03b936362e59d280fcd809405bbf3c02..e74164d9c081d54e403b18ce80f4ef59a949781c 100644 (file)
@@ -212,15 +212,14 @@ void nfs_sb_deactive(struct super_block *sb)
 }
 EXPORT_SYMBOL_GPL(nfs_sb_deactive);
 
-static int __nfs_list_for_each_server(struct list_head *head,
-               int (*fn)(struct nfs_server *, void *),
-               void *data)
+int nfs_client_for_each_server(struct nfs_client *clp,
+               int (*fn)(struct nfs_server *server, void *data), void *data)
 {
        struct nfs_server *server, *last = NULL;
        int ret = 0;
 
        rcu_read_lock();
-       list_for_each_entry_rcu(server, head, client_link) {
+       list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) {
                if (!(server->super && nfs_sb_active(server->super)))
                        continue;
                rcu_read_unlock();
@@ -239,13 +238,6 @@ out:
                nfs_sb_deactive(last->super);
        return ret;
 }
-
-int nfs_client_for_each_server(struct nfs_client *clp,
-               int (*fn)(struct nfs_server *, void *),
-               void *data)
-{
-       return __nfs_list_for_each_server(&clp->cl_superblocks, fn, data);
-}
 EXPORT_SYMBOL_GPL(nfs_client_for_each_server);
 
 /*