Message ID | ae213806d1188320ec55b730582705133b51dd22.1724263426.git.trond.myklebust@hammerspace.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/3] NFSv4: Add missing rescheduling points in nfs_client_return_marked_delegations | expand |
On Wed, 2024-08-21 at 14:05 -0400, trondmy@kernel.org wrote: > From: Trond Myklebust <trond.myklebust@hammerspace.com> > > 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> > --- > fs/nfs/super.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/nfs/super.c b/fs/nfs/super.c > index cbbd4866b0b7..97b386032b71 100644 > --- a/fs/nfs/super.c > +++ b/fs/nfs/super.c > @@ -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(); Reviewed-by: Jeff Layton <jlayton@kernel.org>
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index cbbd4866b0b7..97b386032b71 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -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();