All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, axboe@kernel.dk,
	viro@zeniv.linux.org.uk, dm-devel@redhat.com,
	Dmitry Monakhov <dmonakhov@openvz.org>
Subject: [PATCH 1/7] fs: use gendisk->disk_name where possible
Date: Fri, 17 Apr 2015 12:29:13 +0400	[thread overview]
Message-ID: <1429259359-13480-2-git-send-email-dmonakhov@openvz.org> (raw)
In-Reply-To: <1429259359-13480-1-git-send-email-dmonakhov@openvz.org>

gendisk with part==0 is obviously gendisk->disk_name.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 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 c7e4163..874a8d1 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1012,12 +1012,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)
@@ -1041,12 +1038,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


  reply	other threads:[~2015-04-17  8:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17  8:29 [PATCH 0/7] fs: add blkdev name format specifier v2 Dmitry Monakhov
2015-04-17  8:29 ` Dmitry Monakhov [this message]
2015-04-17  8:29 ` [PATCH 2/7] lib/vsprintf: add %*pg format specifier Dmitry Monakhov
2015-04-17  8:29 ` [PATCH 3/7] block: use block_device name vsprintf helper Dmitry Monakhov
2015-04-17  8:29 ` [PATCH 4/7] fs: " Dmitry Monakhov
2015-04-17  8:29 ` [PATCH 5/7] md: use block_device name vsprintf helper v2 Dmitry Monakhov
2015-04-17  8:29 ` [PATCH 6/7] block/partitions: use block_device name vsprintf helper Dmitry Monakhov
2015-04-17  8:29 ` [PATCH 7/7] drivers: " Dmitry Monakhov
  -- strict thread matches above, loose matches on Subject: below --
2015-04-13 12:31 [PATCH 0/7] fs: add blkdev name format specifier v2 Dmitry Monakhov
2015-04-13 12:31 ` [PATCH 1/7] fs: use gendisk->disk_name where possible Dmitry Monakhov
2015-04-13 12:31   ` Dmitry Monakhov
2015-04-14  9:13   ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429259359-13480-2-git-send-email-dmonakhov@openvz.org \
    --to=dmonakhov@openvz.org \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.