2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-20 08:38:24 +08:00

sg: remove unnecessary blk_rq_unmap_user

blk_rq_unmap_user in sg_finish_rem_req can take care of all the cases.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
FUJITA Tomonori 2008-09-02 22:50:08 +09:00 committed by Jens Axboe
parent 0b6cb26c66
commit 4677735f03

View File

@ -522,10 +522,6 @@ sg_new_read(Sg_fd * sfp, char __user *buf, size_t count, Sg_request * srp)
err = -EFAULT;
goto err_out;
}
if (srp->bio) {
err = blk_rq_unmap_user(srp->bio);
srp->bio = NULL;
}
err_out:
sg_finish_rem_req(srp);
return (0 == err) ? count : err;
@ -1844,9 +1840,6 @@ sg_read_oxfer(Sg_request * srp, char __user *outp, int num_read_xfer)
if ((!outp) || (num_read_xfer <= 0))
return 0;
blk_rq_unmap_user(srp->bio);
srp->bio = NULL;
num = 1 << (PAGE_SHIFT + schp->page_order);
for (k = 0; k < schp->k_use_sg && schp->pages[k]; k++) {
if (num > num_read_xfer) {