tree f269f327be4bce9c79f303a8720bf3c262fe1970
parent 1872bcebbcd6ad7ddd99e92fb1e4f3d19e73919c
author Carsten Otte <[EMAIL PROTECTED]> Thu, 28 Jul 2005 01:43:52 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Thu, 28 Jul 2005 06:25:53 -0700

[PATCH] 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]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 fs/ext2/xip.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext2/xip.c b/fs/ext2/xip.c
--- a/fs/ext2/xip.c
+++ b/fs/ext2/xip.c
@@ -36,7 +36,7 @@ __ext2_get_sector(struct inode *inode, s
        *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 bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to