Skip to contentSkip to conversation

Btrfs: return error if the range we want to map is bogus

PATCH New Josef Bacik 1 participant 1 message Mar 15, 2011 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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,

---
 fs/btrfs/extent_io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/btrfs/extent_io.c +1 -0
index 714adc4..1bbd26b 100644
@@ -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);
Signature · 1 line
1.7.2.3