Re: [PATCH v3 3/9] loop: Switch to set_capacity_revalidate_and_notify()

From: Christoph Hellwig
Date: Mon Apr 27 2020 - 10:54:10 EST


On Mon, Apr 27, 2020 at 09:42:16AM +0200, Martijn Coenen wrote:
> struct block_device *bdev = lo->lo_device;
>
> - set_capacity(lo->lo_disk, size);
> bd_set_size(bdev, size << SECTOR_SHIFT);
> +
> /* let user-space know about the new size */
> - kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, KOBJ_CHANGE);
> + set_capacity_revalidate_and_notify(lo->lo_disk, size, false);

I'd drop the comment as that is pretty explicit with
set_capacity_revalidate_and_notify.

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>