• Jan Schmidt's avatar
    btrfs: Do not use bio->bi_bdev after submission · 1503140d
    Jan Schmidt authored
    The block layer modifies bio->bi_bdev and bio->bi_sector while working on
    the bio, they do _not_ come back unmodified in the completion callback.
    
    To call add_page, we need at least some bi_bdev set, which is why the code
    was working, previously. With this patch, we use the latest_bdev from
    fsinfo instead of the leftover in the bio. This gives us the possibility to
    use the bi_bdev field for another purpose.
    Signed-off-by: default avatarJan Schmidt <list.btrfs@jan-o-sch.net>
    1503140d
inode.c 198 KB