lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 5 Sep 2008 15:12:44 +0200
From:	Andre Noll <maan@...temlinux.org>
To:	Andrew Patterson <andrew.patterson@...com>
Cc:	linux-scsi@...r.kernel.org, James.Bottomley@...senPartnership.com,
	linux-kernel@...r.kernel.org, viro@...iv.linux.org.uk,
	axboe@...nel.dk, andmike@...ux.vnet.ibm.com, mike.miller@...com,
	genanr@...phone.com, jmoyer@...hat.com
Subject: Re: [PATCH 2/6] Adjust block device size after an online resize of a disk.

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

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ