From 68ba990f7d161c31e9eddd98727ba8393089047f Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Mon, 25 Nov 2013 03:22:07 +0000 Subject: [PATCH] Btrfs: fix extent boundary check in bio_readpage_error Signed-off-by: Filipe David Borba Manana Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index d97250a4e8e6..3721820687d7 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2156,7 +2156,7 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset, return -EIO; } - if (em->start > start || em->start + em->len < start) { + if (em->start > start || em->start + em->len <= start) { free_extent_map(em); em = NULL; }