btrfs: s_bdev is not null after missing replace
commit8ed01abe7da6af62f2089da9a4c1fe839dc638f5
authorAnand Jain <anand.jain@oracle.com>
Thu, 14 Apr 2016 10:24:10 +0000 (14 18:24 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 4 May 2016 07:52:44 +0000 (4 09:52 +0200)
treedfa4f934f163c593995b20a897df8d5872948b71
parentb5255456c529155730c837f8cfcea47e8feb85ca
btrfs: s_bdev is not null after missing replace

Yauhen reported in the ML that s_bdev is null at mount, and
s_bdev gets updated to some device when missing device is
replaced, as because bdev is null for missing device, things
gets matched up. Fix this by checking if s_bdev is set. I
didn't want to completely remove updating s_bdev because
the future multi device support at vfs layer may need it.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reported-by: Yauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/dev-replace.c
fs/btrfs/volumes.c