Commit 424081f3 authored by Dmitry Monakhov's avatar Dmitry Monakhov Committed by Al Viro

fs: use gendisk->disk_name where possible

gendisk with part==0 is obviously gendisk->disk_name.
Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ccec5ee3
...@@ -1042,12 +1042,9 @@ EXPORT_SYMBOL_GPL(bd_unlink_disk_holder); ...@@ -1042,12 +1042,9 @@ EXPORT_SYMBOL_GPL(bd_unlink_disk_holder);
static void flush_disk(struct block_device *bdev, bool kill_dirty) static void flush_disk(struct block_device *bdev, bool kill_dirty)
{ {
if (__invalidate_device(bdev, 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 " 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) if (!bdev->bd_disk)
...@@ -1071,12 +1068,9 @@ void check_disk_size_change(struct gendisk *disk, struct block_device *bdev) ...@@ -1071,12 +1068,9 @@ void check_disk_size_change(struct gendisk *disk, struct block_device *bdev)
disk_size = (loff_t)get_capacity(disk) << 9; disk_size = (loff_t)get_capacity(disk) << 9;
bdev_size = i_size_read(bdev->bd_inode); bdev_size = i_size_read(bdev->bd_inode);
if (disk_size != bdev_size) { if (disk_size != bdev_size) {
char name[BDEVNAME_SIZE];
disk_name(disk, 0, name);
printk(KERN_INFO printk(KERN_INFO
"%s: detected capacity change from %lld to %lld\n", "%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); i_size_write(bdev->bd_inode, disk_size);
flush_disk(bdev, false); flush_disk(bdev, false);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment