From: FUJITA Tomonori Date: Tue, 2 Sep 2008 13:50:08 +0000 (+0900) Subject: sg: remove unnecessary blk_rq_unmap_user X-Git-Tag: v2.6.28-rc1~733^2~38 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4677735f03f5b6b6f2182f457a921855cadfb85b;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Jens Axboe --- diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index df8bf67b171..ba9b9bbd4e7 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -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) {