]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix unprotected assignment of the target device
authorMiao Xie <miaox@cn.fujitsu.com>
Wed, 3 Sep 2014 13:35:32 +0000 (21:35 +0800)
committerChris Mason <clm@fb.com>
Wed, 17 Sep 2014 20:38:31 +0000 (13:38 -0700)
commit0ed219027affe33e24dfac67a5ef09b2808e39cd
treee5800ddfd965032bcd139ff4595e64d3868a6a5c
parent38ff67a0abaf9227c2e2e12e7309881b2239d978
Btrfs: fix unprotected assignment of the target device

We didn't protect the assignment of the target device, it might cause the
problem that the super block update was skipped because we might find wrong
size of the target device during the assignment. Fix it by moving the
assignment sentences into the initialization function of the target device.
And there is another merit that we can check if the target device is suitable
more early.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/dev-replace.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h