linux-fsdevel.vger.kernel.org archive mirror
 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,
	dm-devel@redhat.com, Dmitry Monakhov <dmonakhov@openvz.org>,
	viro@zeniv.linux.org.uk
Subject: [PATCH 1/7] fs: use gendisk->disk_name where possible
Date: Mon, 13 Apr 2015 16:31:34 +0400	[thread overview]
Message-ID: <1428928300-9132-2-git-send-email-dmonakhov@openvz.org> (raw)
In-Reply-To: <1428928300-9132-1-git-send-email-dmonakhov@openvz.org>

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

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 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

  reply	other threads:[~2015-04-13 12:31 UTC|newest]

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

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=1428928300-9132-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).