Skip to content

Commit af63dd7

Browse files
author
Al Viro
committed
bcache_register(): don't bother with set_blocksize()
We are not using __bread() anymore and read_cache_page_gfp() doesn't care about block size. Moreover, we should *not* change block size on a device that is currently held exclusive - filesystems that use buffer cache expect the block numbers to be interpreted in units set by filesystem. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Christian Brauner <brauner@kernel.org> ACKed-by: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 0bbac3f commit af63dd7

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

drivers/md/bcache/super.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,10 +2554,6 @@ static ssize_t register_bcache(struct kobject *k, struct kobj_attribute *attr,
25542554
if (IS_ERR(bdev_file))
25552555
goto out_free_sb;
25562556

2557-
err = "failed to set blocksize";
2558-
if (set_blocksize(file_bdev(bdev_file), 4096))
2559-
goto out_blkdev_put;
2560-
25612557
err = read_super(sb, file_bdev(bdev_file), &sb_disk);
25622558
if (err)
25632559
goto out_blkdev_put;

0 commit comments

Comments
 (0)