Re: [PATCH 2/6] Adjust block device size after an online resize of a disk.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14:27, Andrew Patterson wrote:
>  int revalidate_disk(struct gendisk *disk)
>  {
> +	struct block_device *bdev;
>  	int ret = 0;
>  
>  	if (disk->fops->revalidate_disk)
>  		ret = disk->fops->revalidate_disk(disk);

Maybe we should return early at this point if revalidate_disk()
failed or fops->revalidate_disk is NULL.

> +	bdev = bdget_disk(disk, 0);
> +	if (!bdev)
> +		return ret;

We might return success here even if bdev is NULL. OTOH, as the callers
of revalidate_disk() do not check the return value anyway (although at
least tapeblock_revalidate_disk() might return a negative value) it's
probably also an option to change the return type of revalidate_disk()
to void.

Andre
-- 
The only person who always got his work done by Friday was Robinson Crusoe

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux