SUNRPC: Set memalloc_nofs_save() for sync tasks
authorBenjamin Coddington <bcodding@redhat.com>
Wed, 3 Mar 2021 13:47:16 +0000 (08:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:33 +0000 (17:06 +0100)
commitfaa48b23d0e39e0120e728e66ac58cb69690a609
tree0084754a1fbb63fd99a1a33aac9aeb75f559fb43
parent475a4307c14c8886ac10495d79bd19e88ee1aa83
SUNRPC: Set memalloc_nofs_save() for sync tasks

[ Upstream commit f0940f4b3284a00f38a5d42e6067c2aaa20e1f2e ]

We could recurse into NFS doing memory reclaim while sending a sync task,
which might result in a deadlock.  Set memalloc_nofs_save for sync task
execution.

Fixes: a1231fda7e94 ("SUNRPC: Set memalloc_nofs_save() on all rpciod/xprtiod jobs")
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/sched.c