Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

paride/pd: remove ->revalidate_disk

->revalidate_disk is only called during add_disk for pd, but at that
point the driver has already set the capacity to the one returned from
Identify a little earlier, so this additional update is entirely
superflous.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210308074550.422714-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
4bae7afd f8d62edf

-11
-11
drivers/block/paride/pd.c
··· 859 859 return r ? DISK_EVENT_MEDIA_CHANGE : 0; 860 860 } 861 861 862 - static int pd_revalidate(struct gendisk *p) 863 - { 864 - struct pd_unit *disk = p->private_data; 865 - if (pd_special_command(disk, pd_identify) == 0) 866 - set_capacity(p, disk->capacity); 867 - else 868 - set_capacity(p, 0); 869 - return 0; 870 - } 871 - 872 862 static const struct block_device_operations pd_fops = { 873 863 .owner = THIS_MODULE, 874 864 .open = pd_open, ··· 867 877 .compat_ioctl = pd_ioctl, 868 878 .getgeo = pd_getgeo, 869 879 .check_events = pd_check_events, 870 - .revalidate_disk= pd_revalidate 871 880 }; 872 881 873 882 /* probing */