Btrfs: fix extent boundary check in bio_readpage_error
authorFilipe David Borba Manana <fdmanana@gmail.com>
Mon, 25 Nov 2013 03:22:07 +0000 (03:22 +0000)
committerChris Mason <clm@fb.com>
Tue, 28 Jan 2014 21:19:47 +0000 (13:19 -0800)
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/extent_io.c

index d97250a4e8e6f34a0600d0e4ff5a82bf76acdff1..3721820687d78c3258efd0bbffb46ac3f335bf8a 100644 (file)
@@ -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;
                }