diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-08-28 03:17:05 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:10 -0400 |
commit | a3bce90edd8f6cafe3f63b1a943800792e830178 (patch) | |
tree | c07a2962987e57997b4ff6f6c63febe1feaa0a9c /block/bsg.c | |
parent | 45333d5a31296d0af886d94f1d08f128231cab8e (diff) |
block: add gfp_mask argument to blk_rq_map_user and blk_rq_map_user_iov
Currently, blk_rq_map_user and blk_rq_map_user_iov always do
GFP_KERNEL allocation.
This adds gfp_mask argument to blk_rq_map_user and blk_rq_map_user_iov
so sg can use it (sg always does GFP_ATOMIC allocation).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Douglas Gilbert <dougg@torque.net>
Cc: Mike Christie <michaelc@cs.wisc.edu>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/bsg.c')
-rw-r--r-- | block/bsg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/bsg.c b/block/bsg.c index 0aae8d7ba99c..e7a142e9916c 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -283,7 +283,8 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, int has_write_perm) | |||
283 | next_rq->cmd_type = rq->cmd_type; | 283 | next_rq->cmd_type = rq->cmd_type; |
284 | 284 | ||
285 | dxferp = (void*)(unsigned long)hdr->din_xferp; | 285 | dxferp = (void*)(unsigned long)hdr->din_xferp; |
286 | ret = blk_rq_map_user(q, next_rq, dxferp, hdr->din_xfer_len); | 286 | ret = blk_rq_map_user(q, next_rq, dxferp, hdr->din_xfer_len, |
287 | GFP_KERNEL); | ||
287 | if (ret) | 288 | if (ret) |
288 | goto out; | 289 | goto out; |
289 | } | 290 | } |
@@ -298,7 +299,7 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, int has_write_perm) | |||
298 | dxfer_len = 0; | 299 | dxfer_len = 0; |
299 | 300 | ||
300 | if (dxfer_len) { | 301 | if (dxfer_len) { |
301 | ret = blk_rq_map_user(q, rq, dxferp, dxfer_len); | 302 | ret = blk_rq_map_user(q, rq, dxferp, dxfer_len, GFP_KERNEL); |
302 | if (ret) | 303 | if (ret) |
303 | goto out; | 304 | goto out; |
304 | } | 305 | } |