diff options
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r-- | net/sunrpc/sched.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index adc3c40cc733..2168d4d9c09f 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
21 | #include <linux/freezer.h> | 21 | #include <linux/freezer.h> |
22 | #include <linux/sched/mm.h> | ||
22 | 23 | ||
23 | #include <linux/sunrpc/clnt.h> | 24 | #include <linux/sunrpc/clnt.h> |
24 | 25 | ||
@@ -902,7 +903,10 @@ void rpc_execute(struct rpc_task *task) | |||
902 | 903 | ||
903 | static void rpc_async_schedule(struct work_struct *work) | 904 | static void rpc_async_schedule(struct work_struct *work) |
904 | { | 905 | { |
906 | unsigned int pflags = memalloc_nofs_save(); | ||
907 | |||
905 | __rpc_execute(container_of(work, struct rpc_task, u.tk_work)); | 908 | __rpc_execute(container_of(work, struct rpc_task, u.tk_work)); |
909 | memalloc_nofs_restore(pflags); | ||
906 | } | 910 | } |
907 | 911 | ||
908 | /** | 912 | /** |
@@ -1067,7 +1071,10 @@ static void rpc_free_task(struct rpc_task *task) | |||
1067 | 1071 | ||
1068 | static void rpc_async_release(struct work_struct *work) | 1072 | static void rpc_async_release(struct work_struct *work) |
1069 | { | 1073 | { |
1074 | unsigned int pflags = memalloc_nofs_save(); | ||
1075 | |||
1070 | rpc_free_task(container_of(work, struct rpc_task, u.tk_work)); | 1076 | rpc_free_task(container_of(work, struct rpc_task, u.tk_work)); |
1077 | memalloc_nofs_restore(pflags); | ||
1071 | } | 1078 | } |
1072 | 1079 | ||
1073 | static void rpc_release_resources_task(struct rpc_task *task) | 1080 | static void rpc_release_resources_task(struct rpc_task *task) |