NFSv4: Add missing rescheduling points in nfs_client_return_marked_delegations
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 21 Aug 2024 18:05:00 +0000 (14:05 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 22 Aug 2024 21:01:10 +0000 (17:01 -0400)
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>
fs/nfs/super.c

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