diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2015-05-01 17:51:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-08 09:23:50 +0200 |
commit | 9ae10597280cede9b2462b96cec7398cbbf1459f (patch) | |
tree | 9f503ceaf6cf0cb7851eb08df9d83dbcc2215f56 /drivers/staging/lustre/lustre/ptlrpc/sec.c | |
parent | 7795178d1ec256d21a48a0dcffae5f38055b7cd5 (diff) |
staging: lustre: ptlrpc: Use kzalloc and kfree
Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by
kalloc/kcalloc, and OBD_FREE and OBD_FREE_PTR by kfree.
A simplified version of the semantic patch that makes these changes is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@ expression ptr,size; @@
- OBD_ALLOC(ptr,size)
+ ptr = kzalloc(size, GFP_NOFS)
@@ expression ptr, size; @@
- OBD_FREE(ptr, size);
+ kfree(ptr);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/ptlrpc/sec.c')
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/sec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c index 21e9dc9d5580..bcfd0b0b6f93 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c @@ -866,7 +866,7 @@ void sptlrpc_request_out_callback(struct ptlrpc_request *req) if (req->rq_pool || !req->rq_reqbuf) return; - OBD_FREE(req->rq_reqbuf, req->rq_reqbuf_len); + kfree(req->rq_reqbuf); req->rq_reqbuf = NULL; req->rq_reqbuf_len = 0; } |