summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorJosef Bacik2011-03-15 19:52:12 +0100
committerJosef Bacik2011-03-17 19:21:35 +0100
commit850265335f792f5d39ab24e5fb7160bac28d77e5 (patch)
tree8ecc731b9b03e32e067961bc30e6a824ed946187 /fs/btrfs/extent_io.c
parentBtrfs: add a comment explaining what btrfs_cont_expand does (diff)
downloadkernel-qcow2-linux-850265335f792f5d39ab24e5fb7160bac28d77e5.tar.gz
kernel-qcow2-linux-850265335f792f5d39ab24e5fb7160bac28d77e5.tar.xz
kernel-qcow2-linux-850265335f792f5d39ab24e5fb7160bac28d77e5.zip
Btrfs: return error if the range we want to map is bogus
Currently if we have corrupt metadata map_extent_buffer will complain about it, but not return an error so the caller has no idea a problem was hit. Fix this. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 714adc4ac4c2..1bbd26b4fc5c 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3690,6 +3690,7 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start,
"wanted %lu %lu\n", (unsigned long long)eb->start,
eb->len, start, min_len);
WARN_ON(1);
+ return -EINVAL;
}
p = extent_buffer_page(eb, i);