lkml.org 
[lkml]   [2008]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-09-05 15:25    [W:0.070 / U:2.744 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site