ext4: remove block_device_ejected()
authorYu Kuai <yukuai3@huawei.com>
Thu, 11 Apr 2024 14:53:42 +0000 (15:53 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 3 May 2024 06:28:27 +0000 (02:28 -0400)
commit559428a915e8a06e9e61a8327d0b2216116d3b14
treec80bf1a56097b39281a378e680f1ae73c4c83731
parentd18a8679581e8d1166b68e211d16c5349ae8c38c
ext4: remove block_device_ejected()

block_device_ejected() is added by commit bdfe0cbd746a ("Revert
"ext4: remove block_device_ejected"") in 2015. At that time 'bdi->wb'
is destroyed synchronized from del_gendisk(), hence if ext4 is still
mounted, and then mark_buffer_dirty() will reference destroyed 'wb'.
However, such problem doesn't exist anymore:

- commit d03f6cdc1fc4 ("block: Dynamically allocate and refcount
backing_dev_info") switch bdi to use refcounting;
- commit 13eec2363ef0 ("fs: Get proper reference for s_bdi"), will grab
additional reference of bdi while mounting, so that 'bdi->wb' will not
be destroyed until generic_shutdown_super().

Hence remove this dead function block_device_ejected().

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Link: https://lore.kernel.org/r/20240411145346.2516848-7-viro@zeniv.linux.org.uk
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/ext4/super.c