summaryrefslogtreecommitdiffstats
path: root/fs/ext3/inode.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-09-13 09:55:09 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-09-13 09:55:09 -0400
commit0bc0748dfbefacce9c6b67ab23f2c80133b598f7 (patch)
tree76946adc08a26973fcdb39fe0eb3ef5e1f8f121d /fs/ext3/inode.c
parentb6397893a5ed81970e803d61ee2f1a0e79f87438 (diff)
parent95064a75ebf8744e1ff595e8cd7ff9b6c851523e (diff)
Merge branch 'master' into gfs2
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r--fs/ext3/inode.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index c5ee9f0691e..0f0b1eadb98 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1009,11 +1009,14 @@ struct buffer_head *ext3_getblk(handle_t *handle, struct inode *inode,
buffer_trace_init(&dummy.b_history);
err = ext3_get_blocks_handle(handle, inode, block, 1,
&dummy, create, 1);
- if (err == 1) {
+ /*
+ * ext3_get_blocks_handle() returns number of blocks
+ * mapped. 0 in case of a HOLE.
+ */
+ if (err > 0) {
+ if (err > 1)
+ WARN_ON(1);
err = 0;
- } else if (err >= 0) {
- WARN_ON(1);
- err = -EIO;
}
*errp = err;
if (!err && buffer_mapped(&dummy)) {