From: Kenn H. <ke...@us...> - 2002-12-31 22:37:22
|
Update of /cvsroot/linux-vax/kernel-2.5/drivers/scsi In directory sc8-pr-cvs1:/tmp/cvs-serv9566/drivers/scsi Modified Files: scsi_merge.c Log Message: Merge with 2.5.16 Index: scsi_merge.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/scsi/scsi_merge.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- scsi_merge.c 16 Dec 2002 01:06:00 -0000 1.5 +++ scsi_merge.c 31 Dec 2002 22:37:18 -0000 1.6 @@ -78,8 +78,12 @@ if (in_interrupt()) gfp_mask &= ~__GFP_WAIT; + /* + * if sg table allocation fails, requeue request later. + */ sgpnt = scsi_alloc_sgtable(SCpnt, gfp_mask); - BUG_ON(!sgpnt); + if (!sgpnt) + return 0; SCpnt->request_buffer = (char *) sgpnt; SCpnt->request_bufflen = req->nr_sectors << 9; @@ -102,8 +106,13 @@ printk("Incorrect number of segments after building list\n"); printk("counted %d, received %d\n", count, SCpnt->use_sg); printk("req nr_sec %lu, cur_nr_sec %u\n", req->nr_sectors, req->current_nr_sectors); - BUG(); - return 0; /* ahem */ + + /* + * kill it. there should be no leftover blocks in this request + */ + SCpnt = scsi_end_request(SCpnt, 0, req->nr_sectors); + BUG_ON(SCpnt); + return 0; } /* |