patch-1.3.69 linux/fs/block_dev.c

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

diff -u --recursive --new-file v1.3.68/linux/fs/block_dev.c linux/fs/block_dev.c
@@ -61,8 +61,11 @@
 	else
 		size = INT_MAX;
 	while (count>0) {
-		if (block >= size)
+		if (block >= size) {
+			if (!written)
+				written = -ENOSPC;
 			return written;
+		}
 		chars = blocksize - offset;
 		if (chars > count)
 			chars=count;

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