aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/sched.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-03-29 16:47:58 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-05-01 01:17:11 -0400
commitc5a4dd8b7c15927a8fbff83171b57cad675a79b9 (patch)
tree2d3b1930449b31f69dc70a6e1d4e0f0532f3f118 /include/linux/sunrpc/sched.h
parent2bea90d43a050bbc4021d44e59beb34f384438db (diff)
SUNRPC: Eliminate side effects from rpc_malloc
Currently rpc_malloc sets req->rq_buffer internally. Make this a more generic interface: return a pointer to the new buffer (or NULL) and make the caller set req->rq_buffer and req->rq_bufsize. This looks much more like kmalloc and eliminates the side effects. To fix a potential deadlock, this patch also replaces GFP_NOFS with GFP_NOWAIT in rpc_malloc. This prevents async RPCs from sleeping outside the RPC's task scheduler while allocating their buffer. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc/sched.h')
-rw-r--r--include/linux/sunrpc/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index 3069ecca0129..2047fb202a13 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -264,7 +264,7 @@ struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *);
264void rpc_wake_up_status(struct rpc_wait_queue *, int); 264void rpc_wake_up_status(struct rpc_wait_queue *, int);
265void rpc_delay(struct rpc_task *, unsigned long); 265void rpc_delay(struct rpc_task *, unsigned long);
266void * rpc_malloc(struct rpc_task *, size_t); 266void * rpc_malloc(struct rpc_task *, size_t);
267void rpc_free(struct rpc_task *); 267void rpc_free(void *);
268int rpciod_up(void); 268int rpciod_up(void);
269void rpciod_down(void); 269void rpciod_down(void);
270int __rpc_wait_for_completion_task(struct rpc_task *task, int (*)(void *)); 270int __rpc_wait_for_completion_task(struct rpc_task *task, int (*)(void *));