NFS: remove __nfs_client_for_each_server

__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>
This commit is contained in:
Christoph Hellwig 2026-01-07 08:26:52 +01:00 committed by Anna Schumaker
parent 24d479d26b
commit 70f1e6aa3f

View 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 @@ static int __nfs_list_for_each_server(struct list_head *head,
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);
/*