diff options
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r-- | drivers/scsi/sg.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index df8bf67b171a..ba9b9bbd4e73 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) | |||
522 | err = -EFAULT; | 522 | err = -EFAULT; |
523 | goto err_out; | 523 | goto err_out; |
524 | } | 524 | } |
525 | if (srp->bio) { | ||
526 | err = blk_rq_unmap_user(srp->bio); | ||
527 | srp->bio = NULL; | ||
528 | } | ||
529 | err_out: | 525 | err_out: |
530 | sg_finish_rem_req(srp); | 526 | sg_finish_rem_req(srp); |
531 | return (0 == err) ? count : err; | 527 | return (0 == err) ? count : err; |
@@ -1844,9 +1840,6 @@ sg_read_oxfer(Sg_request * srp, char __user *outp, int num_read_xfer) | |||
1844 | if ((!outp) || (num_read_xfer <= 0)) | 1840 | if ((!outp) || (num_read_xfer <= 0)) |
1845 | return 0; | 1841 | return 0; |
1846 | 1842 | ||
1847 | blk_rq_unmap_user(srp->bio); | ||
1848 | srp->bio = NULL; | ||
1849 | |||
1850 | num = 1 << (PAGE_SHIFT + schp->page_order); | 1843 | num = 1 << (PAGE_SHIFT + schp->page_order); |
1851 | for (k = 0; k < schp->k_use_sg && schp->pages[k]; k++) { | 1844 | for (k = 0; k < schp->k_use_sg && schp->pages[k]; k++) { |
1852 | if (num > num_read_xfer) { | 1845 | if (num > num_read_xfer) { |