Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block: pre-initialize struct block_device in bdev_alloc_inode
bdev_evict_inode and bdev_free_inode are also called for the root inode of bdevfs, for which bdev_alloc is never called. Move the zeroing o f struct block_device and the initialization of the bd_bdi field into bdev_alloc_inode to make sure they are initialized for the root inode as well. Fixes: e6cb538 ("block: initialize struct block_device in bdev_alloc") Reported-by: Alexey Kardashevskiy <[email protected]> Tested-by: Alexey Kardashevskiy <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information