diff --git a/[refs] b/[refs] index dc64934347ba..2f4ccce10bfb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d6159c17c2c76963a8067d1e1ac3c4c36c05e674 +refs/heads/master: c06bb7f514567efa39062a781679120e51caa818 diff --git a/trunk/drivers/scsi/sg.c b/trunk/drivers/scsi/sg.c index bfa86b378fb9..b098942445ec 100644 --- a/trunk/drivers/scsi/sg.c +++ b/trunk/drivers/scsi/sg.c @@ -1799,8 +1799,10 @@ sg_build_direct(Sg_request * srp, Sg_fd * sfp, int dxfer_len) res = st_map_user_pages(schp->buffer, mx_sc_elems, (unsigned long)hp->dxferp, dxfer_len, (SG_DXFER_TO_DEV == hp->dxfer_direction) ? 1 : 0); - if (res <= 0) + if (res <= 0) { + sg_remove_scat(schp); return 1; + } schp->k_use_sg = res; schp->dio_in_use = 1; hp->info |= SG_INFO_DIRECT_IO;