summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAshish Samant <ashish.samant@oracle.com>2016-04-29 18:33:59 -0700
committerDavid Sterba <dsterba@suse.com>2016-05-06 15:22:49 +0200
commit2473114981a36b4f0f57cf6e9548037d547a71b7 (patch)
treed74e2a20b84d865a59f33beecacaa3b5d1869257 /fs
parente042d1ec4417981dfe9331e47b76f17929bc2ffe (diff)
downloadlwn-2473114981a36b4f0f57cf6e9548037d547a71b7.tar.gz
lwn-2473114981a36b4f0f57cf6e9548037d547a71b7.zip
btrfs: Fix BUG_ON condition in scrub_setup_recheck_block()
pagev array in scrub_block{} is of size SCRUB_MAX_PAGES_PER_BLOCK. page_index should be checked with the same to trigger BUG_ON(). Signed-off-by: Ashish Samant <ashish.samant@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/scrub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 96d2a0de35a8..d270c700ed31 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -1350,7 +1350,7 @@ static int scrub_setup_recheck_block(struct scrub_block *original_sblock,
recover->bbio = bbio;
recover->map_length = mapped_length;
- BUG_ON(page_index >= SCRUB_PAGES_PER_RD_BIO);
+ BUG_ON(page_index >= SCRUB_MAX_PAGES_PER_BLOCK);
nmirrors = min(scrub_nr_raid_mirrors(bbio), BTRFS_MAX_MIRRORS);