mtd/fs/jffs2 erase.c,1.79,1.80

joern at infradead.org joern at infradead.org
Thu Jul 14 15:46:27 EDT 2005


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/home/joern/mtd/fs/jffs2

Modified Files:
	erase.c 
Log Message:
Mixing "-1" etc. with -EFOO type return codes can lead to collisions.
Changing to -EIO instead.



Index: erase.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/erase.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- erase.c	14 Jul 2005 16:34:35 -0000	1.79
+++ erase.c	14 Jul 2005 19:46:24 -0000	1.80
@@ -305,7 +305,7 @@
 	void *ebuf;
 	uint32_t ofs;
 	size_t retlen;
-	int ret = -1;
+	int ret = -EIO;
 	
 	ebuf = kmalloc(PAGE_SIZE, GFP_KERNEL);
 	if (!ebuf) {
@@ -357,7 +357,7 @@
 
 	switch (jffs2_block_check_erase(c, jeb, &bad_offset)) {
 	case -EAGAIN:	goto refile;
-	case -1:	goto filebad;
+	case -EIO:	goto filebad;
 	}
 
 	/* Write the erase complete marker */	





More information about the linux-mtd-cvs mailing list