mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-06 05:13:18 +00:00
SUNRPC: Set memalloc_nofs_save() for sync tasks
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: a1231fda7e
("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>
This commit is contained in:
parent
ad3dbe35c8
commit
f0940f4b32
@ -963,8 +963,11 @@ void rpc_execute(struct rpc_task *task)
|
||||
|
||||
rpc_set_active(task);
|
||||
rpc_make_runnable(rpciod_workqueue, task);
|
||||
if (!is_async)
|
||||
if (!is_async) {
|
||||
unsigned int pflags = memalloc_nofs_save();
|
||||
__rpc_execute(task);
|
||||
memalloc_nofs_restore(pflags);
|
||||
}
|
||||
}
|
||||
|
||||
static void rpc_async_schedule(struct work_struct *work)
|
||||
|
Loading…
Reference in New Issue
Block a user