Btrfs: fix crash in scrub repair code when device is missing
authorStefan Behrens <sbehrens@giantdisaster.de>
Fri, 4 May 2012 19:16:07 +0000 (15:16 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 4 May 2012 19:16:07 +0000 (15:16 -0400)
Fix that when scrub tries to repair an I/O or checksum error and one of
the devices containing the mirror is missing, it crashes in bio_add_page
because the bdev is a NULL pointer for missing devices.

Reported-by: Marco L. Crociani <marco.crociani@gmail.com>
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/scrub.c

Simple merge