Commit 2d2f6f1
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 <aik@ozlabs.ru>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 04b1ecb commit 2d2f6f1
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
| 779 | + | |
779 | 780 | | |
780 | 781 | | |
| 782 | + | |
| 783 | + | |
781 | 784 | | |
782 | 785 | | |
783 | 786 | | |
| |||
871 | 874 | | |
872 | 875 | | |
873 | 876 | | |
874 | | - | |
875 | 877 | | |
876 | 878 | | |
877 | 879 | | |
878 | 880 | | |
879 | 881 | | |
880 | 882 | | |
881 | | - | |
882 | 883 | | |
883 | 884 | | |
884 | 885 | | |
| |||
0 commit comments