bcache_register(): don't bother with set_blocksize()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 17 Apr 2024 00:12:47 +0000 (20:12 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 2 May 2024 21:23:30 +0000 (17:23 -0400)
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>
drivers/md/bcache/super.c

index 330bcd9ea4a9ccd0366e9c5d28d0e7b1fb061fe6..0ee5e17ae2dda275e3cd9e377bd922e1fee50beb 100644 (file)
@@ -2554,10 +2554,6 @@ static ssize_t register_bcache(struct kobject *k, struct kobj_attribute *attr,
        if (IS_ERR(bdev_file))
                goto out_free_sb;
 
-       err = "failed to set blocksize";
-       if (set_blocksize(file_bdev(bdev_file), 4096))
-               goto out_blkdev_put;
-
        err = read_super(sb, file_bdev(bdev_file), &sb_disk);
        if (err)
                goto out_blkdev_put;