summaryrefslogtreecommitdiff
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-06-26 11:01:54 +0300
committerJens Axboe <axboe@kernel.dk>2020-07-01 17:08:17 +0300
commit5ff9f19231a0e670b3d79c563f1b0b185abeca91 (patch)
treee377861f3b62d42e7d605abd1f57a54978cda905 /fs/block_dev.c
parent9011495c9466ca0aaee2741f98d50ac2ca8cee11 (diff)
downloadlinux-5ff9f19231a0e670b3d79c563f1b0b185abeca91.tar.xz
block: simplify set_init_blocksize
The loop to increase the initial block size doesn't really make any sense, as the AND operation won't match for powers of two if it didn't for the initial block size. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 0e0d43dc27d3..8b7a9c76d33e 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -106,13 +106,7 @@ EXPORT_SYMBOL(invalidate_bdev);
static void set_init_blocksize(struct block_device *bdev)
{
unsigned bsize = bdev_logical_block_size(bdev);
- loff_t size = i_size_read(bdev->bd_inode);
- while (bsize < PAGE_SIZE) {
- if (size & bsize)
- break;
- bsize <<= 1;
- }
bdev->bd_block_size = bsize;
bdev->bd_inode->i_blkbits = blksize_bits(bsize);
}