summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorYang Xiuwei <yangxiuwei@kylinos.cn>2026-01-06 10:42:57 +0800
committerJens Axboe <axboe@kernel.dk>2026-02-04 09:28:18 -0700
commitd4d78dd43cecaeaadb24e78927a4d6fda7d1f1d9 (patch)
tree7b1a15c0d33f61247ea0a66ee605754420412b57 /block
parent2c04718edcd5e1ac8fed9a0f8d0620e8bc94014d (diff)
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>
Diffstat (limited to 'block')
-rw-r--r--block/bdev.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/block/bdev.c b/block/bdev.c
index b8fbb9576110..ed022f8c48c7 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -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);
}