patch-2.3.51 linux/drivers/block/DAC960.c
Next file: linux/drivers/block/Makefile
Previous file: linux/arch/sparc64/solaris/fs.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Thu Mar 9 07:08:50 2000
- Orig file:
v2.3.50/linux/drivers/block/DAC960.c
- Orig date:
Thu Mar 2 14:36:22 2000
diff -u --recursive --new-file v2.3.50/linux/drivers/block/DAC960.c linux/drivers/block/DAC960.c
@@ -1051,20 +1051,23 @@
int max_segments;
DAC960_Controller_T * Controller = q->queuedata;
int total_segments = req->nr_segments + next->nr_segments;
+ int same_segment;
max_segments = Controller->MaxSegmentsPerRequest[MINOR(req->rq_dev)];
if (__max_segments < max_segments)
max_segments = __max_segments;
+ same_segment = 0;
if (req->bhtail->b_data + req->bhtail->b_size == next->bh->b_data)
{
total_segments--;
- q->nr_segments--;
+ same_segment = 1;
}
if (total_segments > max_segments)
return 0;
+ q->nr_segments -= same_segment;
req->nr_segments = total_segments;
return 1;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)