patch-pre2.0.12 linux/drivers/block/ll_rw_blk.c

Next file: linux/drivers/cdrom/optcd.c
Previous file: linux/arch/alpha/kernel/setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.11/linux/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
@@ -92,10 +92,12 @@
 	save_flags(flags);
 	cli();
 	if (dev->current_request == &dev->plug) {
-		dev->current_request = dev->plug.next;
-		dev->plug.next = NULL;
-		if (dev->current_request)
+		struct request * next = dev->plug.next;
+		dev->current_request = next;
+		if (next) {
+			dev->plug.next = NULL;
 			(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