[PATCH 05/42] bdev: Drop pointless invalidate_inode_buffers() call
Jan Kara <[email protected]> Thu, 26 Mar 2026 10:53:59 +0100
| Newsgroups | gmane.linux.kernel.aio.general,gmane.linux.file-systems,gmane.linux.block,gmane.comp.file-systems.ext4,gmane.linux.kernel.mm |
|---|---|
| Message-ID | <[email protected]> |
Nobody is calling mark_buffer_dirty_inode() with internal bdev inode and it doesn't make sense for internal bdev inode to have any metadata buffer heads. Just drop the pointless invalidate_inode_buffers() call and consequently the whole bdev_evict_inode() because generic code takes care of the rest. CC: [email protected] Signed-off-by: Jan Kara <[email protected]> --- block/bdev.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/block/bdev.c b/block/bdev.c index ed022f8c48c7..bb0ffa3bb4df 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -417,19 +417,11 @@ static void init_once(void *data) inode_init_once(&ei->vfs_inode); } -static void bdev_evict_inode(struct inode *inode) -{ - truncate_inode_pages_final(&inode->i_data); - invalidate_inode_buffers(inode); /* is it needed here? */ - clear_inode(inode); -} - static const struct super_operations bdev_sops = { .statfs = simple_statfs, .alloc_inode = bdev_alloc_inode, .free_inode = bdev_free_inode, .drop_inode = inode_just_drop, - .evict_inode = bdev_evict_inode, }; static int bd_init_fs_context(struct fs_context *fc) -- 2.51.0 -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to [email protected]. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: <a href=mailto:"[email protected]">[email protected]</a>