patch-2.0.36 linux/fs/block_dev.c

Next file: linux/fs/buffer.c
Previous file: linux/drivers/sound/sequencer.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.35/linux/fs/block_dev.c linux/fs/block_dev.c
@@ -203,8 +203,11 @@
 			blocks = rblocks;
 		
 	}
-	if (block + blocks > size)
+	if (block + blocks > size) {
 		blocks = size - block;
+		if (blocks == 0)
+			return 0;
+	}
 
 	/* We do this in a two stage process.  We first try to request
 	   as many blocks as we can, then we wait for the first one to

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov