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]
Message-ID: <20150414091314.GD23327@quack.suse.cz>
Date:	Tue, 14 Apr 2015 11:13:14 +0200
From:	Jan Kara <jack@...e.cz>
To:	Dmitry Monakhov <dmonakhov@...nvz.org>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	axboe@...nel.dk, viro@...iv.linux.org.uk, dm-devel@...hat.com
Subject: Re: [PATCH 1/7] fs: use gendisk->disk_name where possible

On Mon 13-04-15 16:31:34, Dmitry Monakhov wrote:
> gendisk with part==0 is obviously gendisk->disk_name.
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@...nvz.org>
  Looks good to me. You can add:
Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  fs/block_dev.c |   12 +++---------
>  1 files changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/fs/block_dev.c b/fs/block_dev.c
> index 79b4fa3..f123b02 100644
> --- a/fs/block_dev.c
> +++ b/fs/block_dev.c
> @@ -1011,12 +1011,9 @@ EXPORT_SYMBOL_GPL(bd_unlink_disk_holder);
>  static void flush_disk(struct block_device *bdev, bool kill_dirty)
>  {
>  	if (__invalidate_device(bdev, kill_dirty)) {
> -		char name[BDEVNAME_SIZE] = "";
> -
> -		if (bdev->bd_disk)
> -			disk_name(bdev->bd_disk, 0, name);
>  		printk(KERN_WARNING "VFS: busy inodes on changed media or "
> -		       "resized disk %s\n", name);
> +		       "resized disk %s\n",
> +		       bdev->bd_disk ? bdev->bd_disk->disk_name : "");
>  	}
>  
>  	if (!bdev->bd_disk)
> @@ -1040,12 +1037,9 @@ void check_disk_size_change(struct gendisk *disk, struct block_device *bdev)
>  	disk_size = (loff_t)get_capacity(disk) << 9;
>  	bdev_size = i_size_read(bdev->bd_inode);
>  	if (disk_size != bdev_size) {
> -		char name[BDEVNAME_SIZE];
> -
> -		disk_name(disk, 0, name);
>  		printk(KERN_INFO
>  		       "%s: detected capacity change from %lld to %lld\n",
> -		       name, bdev_size, disk_size);
> +		       disk->disk_name, bdev_size, disk_size);
>  		i_size_write(bdev->bd_inode, disk_size);
>  		flush_disk(bdev, false);
>  	}
> -- 
> 1.7.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ