block: remove redundant kill_bdev() call in set_blocksize()

The second kill_bdev() call in set_blocksize() is redundant as the first
call already clears all buffers and pagecache, and locks prevent new
pagecache creation between the calls.

Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Yang Xiuwei 2026-01-06 10:42:57 +08:00 committed by Jens Axboe
parent 2c04718edc
commit d4d78dd43c

View file

@ -208,7 +208,6 @@ int set_blocksize(struct file *file, int size)
inode->i_blkbits = blksize_bits(size);
mapping_set_folio_min_order(inode->i_mapping, get_order(size));
kill_bdev(bdev);
filemap_invalidate_unlock(inode->i_mapping);
inode_unlock(inode);
}