• Miao Xie's avatar
    Btrfs: fix unprotected assignment of the target device · 1c43366d
    Miao Xie authored
    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: default avatarMiao Xie <miaox@cn.fujitsu.com>
    Signed-off-by: default avatarChris Mason <clm@fb.com>
    1c43366d
dev-replace.c 28.4 KB