sh: Use boot_cpu_data for FPU tests in sigcontext paths.
[pandora-kernel.git] / drivers / scsi / sg.c
index 747a5e5..040f751 100644 (file)
@@ -1708,11 +1708,6 @@ static int sg_finish_rem_req(Sg_request * srp)
        Sg_scatter_hold *req_schp = &srp->data;
 
        SCSI_LOG_TIMEOUT(4, printk("sg_finish_rem_req: res_used=%d\n", (int) srp->res_used));
-       if (srp->res_used)
-               sg_unlink_reserve(sfp, srp);
-       else
-               sg_remove_scat(req_schp);
-
        if (srp->rq) {
                if (srp->bio)
                        ret = blk_rq_unmap_user(srp->bio);
@@ -1720,6 +1715,11 @@ static int sg_finish_rem_req(Sg_request * srp)
                blk_put_request(srp->rq);
        }
 
+       if (srp->res_used)
+               sg_unlink_reserve(sfp, srp);
+       else
+               sg_remove_scat(req_schp);
+
        sg_remove_request(sfp, srp);
 
        return ret;