patch-1.3.95 linux/drivers/block/ll_rw_blk.c
Next file: linux/drivers/block/loop.c
Previous file: linux/drivers/block/ide.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Tue Apr 23 12:42:38 1996
- Orig file:
v1.3.94/linux/drivers/block/ll_rw_blk.c
- Orig date:
Sun Apr 21 19:22:02 1996
diff -u --recursive --new-file v1.3.94/linux/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
@@ -84,16 +84,19 @@
/*
* remove the plug and let it rip..
*/
-static void unplug_device(void * data)
+void unplug_device(void * data)
{
struct blk_dev_struct * dev = (struct blk_dev_struct *) data;
unsigned long flags;
save_flags(flags);
cli();
- dev->current_request = dev->plug.next;
- dev->plug.next = NULL;
- (dev->request_fn)();
+ if (dev->current_request == &dev->plug) {
+ dev->current_request = dev->plug.next;
+ dev->plug.next = NULL;
+ if (dev->current_request)
+ (dev->request_fn)();
+ }
restore_flags(flags);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this