NFSv4: Add missing rescheduling points in nfs_client_return_marked_delegations

BugLink: https://bugs.launchpad.net/bugs/2081278

[ Upstream commit a017ad1313fc91bdf235097fd0a02f673fc7bb11 ]

We're seeing reports of soft lockups when iterating through the loops,
so let's add rescheduling points.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
Trond Myklebust 2024-08-21 14:05:00 -04:00 committed by Stefan Bader
parent 83d42e8bff
commit 6bf7b23f62
1 changed files with 2 additions and 0 deletions

View File

@ -47,6 +47,7 @@
#include <linux/vfs.h> #include <linux/vfs.h>
#include <linux/inet.h> #include <linux/inet.h>
#include <linux/in6.h> #include <linux/in6.h>
#include <linux/sched.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <net/ipv6.h> #include <net/ipv6.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
@ -454,6 +455,7 @@ static int __nfs_list_for_each_server(struct list_head *head,
ret = fn(server, data); ret = fn(server, data);
if (ret) if (ret)
goto out; goto out;
cond_resched();
rcu_read_lock(); rcu_read_lock();
} }
rcu_read_unlock(); rcu_read_unlock();