[PATCH -mm/-rc] fix xip sparse file handling in ext2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[PATCH -mm/-rc] fix xip sparse file handling in ext2
Oliver Paukstadt from our test department is testing the xip patches in
Linus' git-tree. He found a problem that shows when reading a file that
contains sparse blocks (holes) on a -o xip mounted ext2 filesystem: the
BUG_ON() in fs/ext2/xip.c:40 triggers where it should not. The problem
was introduced by a cleanup in my previous patch, this patch fixes it.

Signed-off-by: Carsten Otte <[email protected]>
---
diff -ruwN linux-git/fs/ext2/xip.c linux-git-xip-fixup/fs/ext2/xip.c
--- linux-git/fs/ext2/xip.c	2005-07-25 17:18:38.000000000 +0200
+++ linux-git-xip-fixup/fs/ext2/xip.c	2005-07-26 09:10:49.593563928 +0200
@@ -36,7 +36,7 @@
 	*result = tmp.b_blocknr;
 
 	/* did we get a sparse block (hole in the file)? */
-	if (!(*result)) {
+	if (!tmp.b_blocknr && !rc) {
 		BUG_ON(create);
 		rc = -ENODATA;
 	}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux