patch-2.4.0-test12 linux/drivers/md/lvm.c

Next file: linux/drivers/md/md.c
Previous file: linux/drivers/md/linear.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test11/linux/drivers/md/lvm.c linux/drivers/md/lvm.c
@@ -123,6 +123,7 @@
  *               - avoided inline strings functions lvm_strlen etc.
  *    14/02/2000 - support for 2.3.43
  *               - integrated Andrea Arcangeli's snapshot code
+ *    07/12/2000 - make sure lvm_make_request_fn returns correct value - 0 or 1 - NeilBrown
  *
  */
 
@@ -1488,8 +1489,10 @@
  */
 static int lvm_make_request_fn(request_queue_t *q, int rw, struct buffer_head *bh)
 {
-	lvm_map(bh, rw);
-	return 1;
+	if (lvm_map(bh, rw)<0)
+		return 0; /* failure, buffer_IO_error has been called, don't recurse */
+	else
+		return 1; /* all ok, mapping done, call lower level driver */
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)