diff options
author | Carsten Otte <cotte@freenet.de> | 2005-07-27 14:43:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:25:53 -0400 |
commit | 0cfc11ed45e4c00750039e5a18c0fc0d681e19db (patch) | |
tree | f269f327be4bce9c79f303a8720bf3c262fe1970 /fs | |
parent | 1872bcebbcd6ad7ddd99e92fb1e4f3d19e73919c (diff) |
[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 <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext2/xip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext2/xip.c b/fs/ext2/xip.c index 0aa5ac159c09..ca7f00312388 100644 --- a/fs/ext2/xip.c +++ b/fs/ext2/xip.c | |||
@@ -36,7 +36,7 @@ __ext2_get_sector(struct inode *inode, sector_t offset, int create, | |||
36 | *result = tmp.b_blocknr; | 36 | *result = tmp.b_blocknr; |
37 | 37 | ||
38 | /* did we get a sparse block (hole in the file)? */ | 38 | /* did we get a sparse block (hole in the file)? */ |
39 | if (!(*result)) { | 39 | if (!tmp.b_blocknr && !rc) { |
40 | BUG_ON(create); | 40 | BUG_ON(create); |
41 | rc = -ENODATA; | 41 | rc = -ENODATA; |
42 | } | 42 | } |