• Chris Mason's avatar
    Btrfs: make sure we update latest_bdev · a6b0d5c8
    Chris Mason authored
    When we are setting up the mount, we close all the
    devices that were not actually part of the metadata we found.
    
    But, we don't make sure that one of those devices wasn't
    fs_devices->latest_bdev, which means we can do a use after free
    on the one we closed.
    
    This updates latest_bdev as it goes.
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    a6b0d5c8
disk-io.c 97.6 KB