提交 ac6b91b8 编写于 作者: F FUJITA Tomonori 提交者: Jens Axboe

block: changes for blk_rq_unmap_user new API

This converts block/scsi_ioctl.c use blk_rq_unmap_user new
API. blk_unmap_sghdr_rq is too simple and it might be better to remove
it.
Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 3d6392cf
......@@ -245,17 +245,7 @@ EXPORT_SYMBOL_GPL(blk_fill_sghdr_rq);
*/
int blk_unmap_sghdr_rq(struct request *rq, struct sg_io_hdr *hdr)
{
struct bio *bio = rq->bio;
/*
* also releases request
*/
if (!hdr->iovec_count)
return blk_rq_unmap_user(bio, hdr->dxfer_len);
rq_for_each_bio(bio, rq)
bio_unmap_user(bio);
blk_rq_unmap_user(rq->bio);
blk_put_request(rq);
return 0;
}
......@@ -335,7 +325,6 @@ static int sg_io(struct file *file, request_queue_t *q,
has_write_perm = file->f_mode & FMODE_WRITE;
if (blk_fill_sghdr_rq(q, rq, hdr, has_write_perm)) {
blk_rq_unmap_user(bio, hdr->dxfer_len);
blk_put_request(rq);
return -EFAULT;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册