aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/super.c4
-rw-r--r--fs/buffer.c21
-rw-r--r--fs/ext2/xattr.c6
-rw-r--r--fs/ext4/page-io.c5
-rw-r--r--fs/ext4/xattr.c6
-rw-r--r--fs/f2fs/debug.c6
-rw-r--r--fs/gfs2/ops_fstype.c4
-rw-r--r--fs/jbd2/transaction.c6
-rw-r--r--fs/minix/itree_v1.c9
-rw-r--r--fs/minix/itree_v2.c9
-rw-r--r--fs/nilfs2/super.c6
-rw-r--r--fs/reiserfs/journal.c24
-rw-r--r--fs/reiserfs/prints.c9
-rw-r--r--fs/reiserfs/procfs.c5
-rw-r--r--fs/squashfs/super.c7
-rw-r--r--fs/super.c4
-rw-r--r--fs/xfs/xfs_buf.c8
17 files changed, 49 insertions, 90 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 24154e422945..a0434c179ea9 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1514,9 +1514,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
1514 if ((flags ^ s->s_flags) & MS_RDONLY) 1514 if ((flags ^ s->s_flags) & MS_RDONLY)
1515 error = -EBUSY; 1515 error = -EBUSY;
1516 } else { 1516 } else {
1517 char b[BDEVNAME_SIZE]; 1517 snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev);
1518
1519 strlcpy(s->s_id, bdevname(bdev, b), sizeof(s->s_id));
1520 btrfs_sb(s)->bdev_holder = fs_type; 1518 btrfs_sb(s)->bdev_holder = fs_type;
1521 error = btrfs_fill_super(s, fs_devices, data, 1519 error = btrfs_fill_super(s, fs_devices, data,
1522 flags & MS_SILENT ? 1 : 0); 1520 flags & MS_SILENT ? 1 : 0);
diff --git a/fs/buffer.c b/fs/buffer.c
index 4f4cd959da7c..e1632abb4ca9 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -134,13 +134,10 @@ __clear_page_buffers(struct page *page)
134 134
135static void buffer_io_error(struct buffer_head *bh, char *msg) 135static void buffer_io_error(struct buffer_head *bh, char *msg)
136{ 136{
137 char b[BDEVNAME_SIZE];
138
139 if (!test_bit(BH_Quiet, &bh->b_state)) 137 if (!test_bit(BH_Quiet, &bh->b_state))
140 printk_ratelimited(KERN_ERR 138 printk_ratelimited(KERN_ERR
141 "Buffer I/O error on dev %s, logical block %llu%s\n", 139 "Buffer I/O error on dev %pg, logical block %llu%s\n",
142 bdevname(bh->b_bdev, b), 140 bh->b_bdev, (unsigned long long)bh->b_blocknr, msg);
143 (unsigned long long)bh->b_blocknr, msg);
144} 141}
145 142
146/* 143/*
@@ -237,15 +234,13 @@ __find_get_block_slow(struct block_device *bdev, sector_t block)
237 * elsewhere, don't buffer_error if we had some unmapped buffers 234 * elsewhere, don't buffer_error if we had some unmapped buffers
238 */ 235 */
239 if (all_mapped) { 236 if (all_mapped) {
240 char b[BDEVNAME_SIZE];
241
242 printk("__find_get_block_slow() failed. " 237 printk("__find_get_block_slow() failed. "
243 "block=%llu, b_blocknr=%llu\n", 238 "block=%llu, b_blocknr=%llu\n",
244 (unsigned long long)block, 239 (unsigned long long)block,
245 (unsigned long long)bh->b_blocknr); 240 (unsigned long long)bh->b_blocknr);
246 printk("b_state=0x%08lx, b_size=%zu\n", 241 printk("b_state=0x%08lx, b_size=%zu\n",
247 bh->b_state, bh->b_size); 242 bh->b_state, bh->b_size);
248 printk("device %s blocksize: %d\n", bdevname(bdev, b), 243 printk("device %pg blocksize: %d\n", bdev,
249 1 << bd_inode->i_blkbits); 244 1 << bd_inode->i_blkbits);
250 } 245 }
251out_unlock: 246out_unlock:
@@ -531,10 +526,8 @@ repeat:
531 526
532static void do_thaw_one(struct super_block *sb, void *unused) 527static void do_thaw_one(struct super_block *sb, void *unused)
533{ 528{
534 char b[BDEVNAME_SIZE];
535 while (sb->s_bdev && !thaw_bdev(sb->s_bdev, sb)) 529 while (sb->s_bdev && !thaw_bdev(sb->s_bdev, sb))
536 printk(KERN_WARNING "Emergency Thaw on %s\n", 530 printk(KERN_WARNING "Emergency Thaw on %pg\n", sb->s_bdev);
537 bdevname(sb->s_bdev, b));
538} 531}
539 532
540static void do_thaw_all(struct work_struct *work) 533static void do_thaw_all(struct work_struct *work)
@@ -1074,12 +1067,10 @@ grow_buffers(struct block_device *bdev, sector_t block, int size, gfp_t gfp)
1074 * pagecache index. (this comparison is done using sector_t types). 1067 * pagecache index. (this comparison is done using sector_t types).
1075 */ 1068 */
1076 if (unlikely(index != block >> sizebits)) { 1069 if (unlikely(index != block >> sizebits)) {
1077 char b[BDEVNAME_SIZE];
1078
1079 printk(KERN_ERR "%s: requested out-of-range block %llu for " 1070 printk(KERN_ERR "%s: requested out-of-range block %llu for "
1080 "device %s\n", 1071 "device %pg\n",
1081 __func__, (unsigned long long)block, 1072 __func__, (unsigned long long)block,
1082 bdevname(bdev, b)); 1073 bdev);
1083 return -EIO; 1074 return -EIO;
1084 } 1075 }
1085 1076
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
index fa70848afa8f..a21c259b5fde 100644
--- a/fs/ext2/xattr.c
+++ b/fs/ext2/xattr.c
@@ -77,10 +77,8 @@
77 printk("\n"); \ 77 printk("\n"); \
78 } while (0) 78 } while (0)
79# define ea_bdebug(bh, f...) do { \ 79# define ea_bdebug(bh, f...) do { \
80 char b[BDEVNAME_SIZE]; \ 80 printk(KERN_DEBUG "block %pg:%lu: ", \
81 printk(KERN_DEBUG "block %s:%lu: ", \ 81 bh->b_bdev, (unsigned long) bh->b_blocknr); \
82 bdevname(bh->b_bdev, b), \
83 (unsigned long) bh->b_blocknr); \
84 printk(f); \ 82 printk(f); \
85 printk("\n"); \ 83 printk("\n"); \
86 } while (0) 84 } while (0)
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index 17fbe3882b8e..090b3498638e 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -52,9 +52,8 @@ void ext4_exit_pageio(void)
52 */ 52 */
53static void buffer_io_error(struct buffer_head *bh) 53static void buffer_io_error(struct buffer_head *bh)
54{ 54{
55 char b[BDEVNAME_SIZE]; 55 printk_ratelimited(KERN_ERR "Buffer I/O error on device %pg, logical block %llu\n",
56 printk_ratelimited(KERN_ERR "Buffer I/O error on device %s, logical block %llu\n", 56 bh->b_bdev,
57 bdevname(bh->b_bdev, b),
58 (unsigned long long)bh->b_blocknr); 57 (unsigned long long)bh->b_blocknr);
59} 58}
60 59
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 6b6b3e751f8c..ec4e50ce0733 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -68,10 +68,8 @@
68 printk("\n"); \ 68 printk("\n"); \
69 } while (0) 69 } while (0)
70# define ea_bdebug(bh, f...) do { \ 70# define ea_bdebug(bh, f...) do { \
71 char b[BDEVNAME_SIZE]; \ 71 printk(KERN_DEBUG "block %pg:%lu: ", \
72 printk(KERN_DEBUG "block %s:%lu: ", \ 72 bh->b_bdev, (unsigned long) bh->b_blocknr); \
73 bdevname(bh->b_bdev, b), \
74 (unsigned long) bh->b_blocknr); \
75 printk(f); \ 73 printk(f); \
76 printk("\n"); \ 74 printk("\n"); \
77 } while (0) 75 } while (0)
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index 478e5d54154f..ad1b18a7705b 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -211,12 +211,10 @@ static int stat_show(struct seq_file *s, void *v)
211 211
212 mutex_lock(&f2fs_stat_mutex); 212 mutex_lock(&f2fs_stat_mutex);
213 list_for_each_entry(si, &f2fs_stat_list, stat_list) { 213 list_for_each_entry(si, &f2fs_stat_list, stat_list) {
214 char devname[BDEVNAME_SIZE];
215
216 update_general_status(si->sbi); 214 update_general_status(si->sbi);
217 215
218 seq_printf(s, "\n=====[ partition info(%s). #%d ]=====\n", 216 seq_printf(s, "\n=====[ partition info(%pg). #%d ]=====\n",
219 bdevname(si->sbi->sb->s_bdev, devname), i++); 217 si->sbi->sb->s_bdev, i++);
220 seq_printf(s, "[SB: 1] [CP: 2] [SIT: %d] [NAT: %d] ", 218 seq_printf(s, "[SB: 1] [CP: 2] [SIT: %d] [NAT: %d] ",
221 si->sit_area_segs, si->nat_area_segs); 219 si->sit_area_segs, si->nat_area_segs);
222 seq_printf(s, "[SSA: %d] [MAIN: %d", 220 seq_printf(s, "[SSA: %d] [MAIN: %d",
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index baab99b69d8a..001c66641243 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -1315,9 +1315,7 @@ static struct dentry *gfs2_mount(struct file_system_type *fs_type, int flags,
1315 if ((flags ^ s->s_flags) & MS_RDONLY) 1315 if ((flags ^ s->s_flags) & MS_RDONLY)
1316 goto error_super; 1316 goto error_super;
1317 } else { 1317 } else {
1318 char b[BDEVNAME_SIZE]; 1318 snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev);
1319
1320 strlcpy(s->s_id, bdevname(bdev, b), sizeof(s->s_id));
1321 sb_set_blocksize(s, block_size(bdev)); 1319 sb_set_blocksize(s, block_size(bdev));
1322 error = fill_super(s, &args, flags & MS_SILENT ? 1 : 0); 1320 error = fill_super(s, &args, flags & MS_SILENT ? 1 : 0);
1323 if (error) 1321 if (error)
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index ca181e81c765..081dff087fc0 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -764,13 +764,11 @@ void jbd2_journal_unlock_updates (journal_t *journal)
764 764
765static void warn_dirty_buffer(struct buffer_head *bh) 765static void warn_dirty_buffer(struct buffer_head *bh)
766{ 766{
767 char b[BDEVNAME_SIZE];
768
769 printk(KERN_WARNING 767 printk(KERN_WARNING
770 "JBD2: Spotted dirty metadata buffer (dev = %s, blocknr = %llu). " 768 "JBD2: Spotted dirty metadata buffer (dev = %pg, blocknr = %llu). "
771 "There's a risk of filesystem corruption in case of system " 769 "There's a risk of filesystem corruption in case of system "
772 "crash.\n", 770 "crash.\n",
773 bdevname(bh->b_bdev, b), (unsigned long long)bh->b_blocknr); 771 bh->b_bdev, (unsigned long long)bh->b_blocknr);
774} 772}
775 773
776/* Call t_frozen trigger and copy buffer data into jh->b_frozen_data. */ 774/* Call t_frozen trigger and copy buffer data into jh->b_frozen_data. */
diff --git a/fs/minix/itree_v1.c b/fs/minix/itree_v1.c
index 282e15ad8cd8..46ca39d6c735 100644
--- a/fs/minix/itree_v1.c
+++ b/fs/minix/itree_v1.c
@@ -24,16 +24,15 @@ static inline block_t *i_data(struct inode *inode)
24static int block_to_path(struct inode * inode, long block, int offsets[DEPTH]) 24static int block_to_path(struct inode * inode, long block, int offsets[DEPTH])
25{ 25{
26 int n = 0; 26 int n = 0;
27 char b[BDEVNAME_SIZE];
28 27
29 if (block < 0) { 28 if (block < 0) {
30 printk("MINIX-fs: block_to_path: block %ld < 0 on dev %s\n", 29 printk("MINIX-fs: block_to_path: block %ld < 0 on dev %pg\n",
31 block, bdevname(inode->i_sb->s_bdev, b)); 30 block, inode->i_sb->s_bdev);
32 } else if (block >= (minix_sb(inode->i_sb)->s_max_size/BLOCK_SIZE)) { 31 } else if (block >= (minix_sb(inode->i_sb)->s_max_size/BLOCK_SIZE)) {
33 if (printk_ratelimit()) 32 if (printk_ratelimit())
34 printk("MINIX-fs: block_to_path: " 33 printk("MINIX-fs: block_to_path: "
35 "block %ld too big on dev %s\n", 34 "block %ld too big on dev %pg\n",
36 block, bdevname(inode->i_sb->s_bdev, b)); 35 block, inode->i_sb->s_bdev);
37 } else if (block < 7) { 36 } else if (block < 7) {
38 offsets[n++] = block; 37 offsets[n++] = block;
39 } else if ((block -= 7) < 512) { 38 } else if ((block -= 7) < 512) {
diff --git a/fs/minix/itree_v2.c b/fs/minix/itree_v2.c
index 78e2d93e5c83..1ee101352586 100644
--- a/fs/minix/itree_v2.c
+++ b/fs/minix/itree_v2.c
@@ -26,18 +26,17 @@ static inline block_t *i_data(struct inode *inode)
26static int block_to_path(struct inode * inode, long block, int offsets[DEPTH]) 26static int block_to_path(struct inode * inode, long block, int offsets[DEPTH])
27{ 27{
28 int n = 0; 28 int n = 0;
29 char b[BDEVNAME_SIZE];
30 struct super_block *sb = inode->i_sb; 29 struct super_block *sb = inode->i_sb;
31 30
32 if (block < 0) { 31 if (block < 0) {
33 printk("MINIX-fs: block_to_path: block %ld < 0 on dev %s\n", 32 printk("MINIX-fs: block_to_path: block %ld < 0 on dev %pg\n",
34 block, bdevname(sb->s_bdev, b)); 33 block, sb->s_bdev);
35 } else if ((u64)block * (u64)sb->s_blocksize >= 34 } else if ((u64)block * (u64)sb->s_blocksize >=
36 minix_sb(sb)->s_max_size) { 35 minix_sb(sb)->s_max_size) {
37 if (printk_ratelimit()) 36 if (printk_ratelimit())
38 printk("MINIX-fs: block_to_path: " 37 printk("MINIX-fs: block_to_path: "
39 "block %ld too big on dev %s\n", 38 "block %ld too big on dev %pg\n",
40 block, bdevname(sb->s_bdev, b)); 39 block, sb->s_bdev);
41 } else if (block < DIRCOUNT) { 40 } else if (block < DIRCOUNT) {
42 offsets[n++] = block; 41 offsets[n++] = block;
43 } else if ((block -= DIRCOUNT) < INDIRCOUNT(sb)) { 42 } else if ((block -= DIRCOUNT) < INDIRCOUNT(sb)) {
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 354013ea22ec..c7343844e6b6 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -1316,13 +1316,11 @@ nilfs_mount(struct file_system_type *fs_type, int flags,
1316 } 1316 }
1317 1317
1318 if (!s->s_root) { 1318 if (!s->s_root) {
1319 char b[BDEVNAME_SIZE]; 1319 s_new = true;
1320
1321 s_new = true;
1322 1320
1323 /* New superblock instance created */ 1321 /* New superblock instance created */
1324 s->s_mode = mode; 1322 s->s_mode = mode;
1325 strlcpy(s->s_id, bdevname(sd.bdev, b), sizeof(s->s_id)); 1323 snprintf(s->s_id, sizeof(s->s_id), "%pg", sd.bdev);
1326 sb_set_blocksize(s, block_size(sd.bdev)); 1324 sb_set_blocksize(s, block_size(sd.bdev));
1327 1325
1328 err = nilfs_fill_super(s, data, flags & MS_SILENT ? 1 : 0); 1326 err = nilfs_fill_super(s, data, flags & MS_SILENT ? 1 : 0);
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 9d6486d416a3..44c2bdced1c8 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -618,12 +618,10 @@ static void release_buffer_page(struct buffer_head *bh)
618 618
619static void reiserfs_end_buffer_io_sync(struct buffer_head *bh, int uptodate) 619static void reiserfs_end_buffer_io_sync(struct buffer_head *bh, int uptodate)
620{ 620{
621 char b[BDEVNAME_SIZE];
622
623 if (buffer_journaled(bh)) { 621 if (buffer_journaled(bh)) {
624 reiserfs_warning(NULL, "clm-2084", 622 reiserfs_warning(NULL, "clm-2084",
625 "pinned buffer %lu:%s sent to disk", 623 "pinned buffer %lu:%pg sent to disk",
626 bh->b_blocknr, bdevname(bh->b_bdev, b)); 624 bh->b_blocknr, bh->b_bdev);
627 } 625 }
628 if (uptodate) 626 if (uptodate)
629 set_buffer_uptodate(bh); 627 set_buffer_uptodate(bh);
@@ -2387,11 +2385,10 @@ static int journal_read(struct super_block *sb)
2387 int replay_count = 0; 2385 int replay_count = 0;
2388 int continue_replay = 1; 2386 int continue_replay = 1;
2389 int ret; 2387 int ret;
2390 char b[BDEVNAME_SIZE];
2391 2388
2392 cur_dblock = SB_ONDISK_JOURNAL_1st_BLOCK(sb); 2389 cur_dblock = SB_ONDISK_JOURNAL_1st_BLOCK(sb);
2393 reiserfs_info(sb, "checking transaction log (%s)\n", 2390 reiserfs_info(sb, "checking transaction log (%pg)\n",
2394 bdevname(journal->j_dev_bd, b)); 2391 journal->j_dev_bd);
2395 start = get_seconds(); 2392 start = get_seconds();
2396 2393
2397 /* 2394 /*
@@ -2651,8 +2648,8 @@ static int journal_init_dev(struct super_block *super,
2651 2648
2652 set_blocksize(journal->j_dev_bd, super->s_blocksize); 2649 set_blocksize(journal->j_dev_bd, super->s_blocksize);
2653 reiserfs_info(super, 2650 reiserfs_info(super,
2654 "journal_init_dev: journal device: %s\n", 2651 "journal_init_dev: journal device: %pg\n",
2655 bdevname(journal->j_dev_bd, b)); 2652 journal->j_dev_bd);
2656 return 0; 2653 return 0;
2657} 2654}
2658 2655
@@ -2724,7 +2721,6 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
2724 struct reiserfs_journal_header *jh; 2721 struct reiserfs_journal_header *jh;
2725 struct reiserfs_journal *journal; 2722 struct reiserfs_journal *journal;
2726 struct reiserfs_journal_list *jl; 2723 struct reiserfs_journal_list *jl;
2727 char b[BDEVNAME_SIZE];
2728 int ret; 2724 int ret;
2729 2725
2730 journal = SB_JOURNAL(sb) = vzalloc(sizeof(struct reiserfs_journal)); 2726 journal = SB_JOURNAL(sb) = vzalloc(sizeof(struct reiserfs_journal));
@@ -2794,10 +2790,10 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
2794 && (le32_to_cpu(jh->jh_journal.jp_journal_magic) != 2790 && (le32_to_cpu(jh->jh_journal.jp_journal_magic) !=
2795 sb_jp_journal_magic(rs))) { 2791 sb_jp_journal_magic(rs))) {
2796 reiserfs_warning(sb, "sh-460", 2792 reiserfs_warning(sb, "sh-460",
2797 "journal header magic %x (device %s) does " 2793 "journal header magic %x (device %pg) does "
2798 "not match to magic found in super block %x", 2794 "not match to magic found in super block %x",
2799 jh->jh_journal.jp_journal_magic, 2795 jh->jh_journal.jp_journal_magic,
2800 bdevname(journal->j_dev_bd, b), 2796 journal->j_dev_bd,
2801 sb_jp_journal_magic(rs)); 2797 sb_jp_journal_magic(rs));
2802 brelse(bhjh); 2798 brelse(bhjh);
2803 goto free_and_return; 2799 goto free_and_return;
@@ -2818,10 +2814,10 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
2818 journal->j_max_trans_age = commit_max_age; 2814 journal->j_max_trans_age = commit_max_age;
2819 } 2815 }
2820 2816
2821 reiserfs_info(sb, "journal params: device %s, size %u, " 2817 reiserfs_info(sb, "journal params: device %pg, size %u, "
2822 "journal first block %u, max trans len %u, max batch %u, " 2818 "journal first block %u, max trans len %u, max batch %u, "
2823 "max commit age %u, max trans age %u\n", 2819 "max commit age %u, max trans age %u\n",
2824 bdevname(journal->j_dev_bd, b), 2820 journal->j_dev_bd,
2825 SB_ONDISK_JOURNAL_SIZE(sb), 2821 SB_ONDISK_JOURNAL_SIZE(sb),
2826 SB_ONDISK_JOURNAL_1st_BLOCK(sb), 2822 SB_ONDISK_JOURNAL_1st_BLOCK(sb),
2827 journal->j_trans_max, 2823 journal->j_trans_max,
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c
index ae1dc841db3a..4f3f928076f3 100644
--- a/fs/reiserfs/prints.c
+++ b/fs/reiserfs/prints.c
@@ -139,11 +139,9 @@ static void sprintf_block_head(char *buf, struct buffer_head *bh)
139 139
140static void sprintf_buffer_head(char *buf, struct buffer_head *bh) 140static void sprintf_buffer_head(char *buf, struct buffer_head *bh)
141{ 141{
142 char b[BDEVNAME_SIZE];
143
144 sprintf(buf, 142 sprintf(buf,
145 "dev %s, size %zd, blocknr %llu, count %d, state 0x%lx, page %p, (%s, %s, %s)", 143 "dev %pg, size %zd, blocknr %llu, count %d, state 0x%lx, page %p, (%s, %s, %s)",
146 bdevname(bh->b_bdev, b), bh->b_size, 144 bh->b_bdev, bh->b_size,
147 (unsigned long long)bh->b_blocknr, atomic_read(&(bh->b_count)), 145 (unsigned long long)bh->b_blocknr, atomic_read(&(bh->b_count)),
148 bh->b_state, bh->b_page, 146 bh->b_state, bh->b_page,
149 buffer_uptodate(bh) ? "UPTODATE" : "!UPTODATE", 147 buffer_uptodate(bh) ? "UPTODATE" : "!UPTODATE",
@@ -530,7 +528,6 @@ static int print_super_block(struct buffer_head *bh)
530 (struct reiserfs_super_block *)(bh->b_data); 528 (struct reiserfs_super_block *)(bh->b_data);
531 int skipped, data_blocks; 529 int skipped, data_blocks;
532 char *version; 530 char *version;
533 char b[BDEVNAME_SIZE];
534 531
535 if (is_reiserfs_3_5(rs)) { 532 if (is_reiserfs_3_5(rs)) {
536 version = "3.5"; 533 version = "3.5";
@@ -543,7 +540,7 @@ static int print_super_block(struct buffer_head *bh)
543 return 1; 540 return 1;
544 } 541 }
545 542
546 printk("%s\'s super block is in block %llu\n", bdevname(bh->b_bdev, b), 543 printk("%pg\'s super block is in block %llu\n", bh->b_bdev,
547 (unsigned long long)bh->b_blocknr); 544 (unsigned long long)bh->b_blocknr);
548 printk("Reiserfs version %s\n", version); 545 printk("Reiserfs version %s\n", version);
549 printk("Block count %u\n", sb_block_count(rs)); 546 printk("Block count %u\n", sb_block_count(rs));
diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c
index 621b9f381fe1..fe999157dd97 100644
--- a/fs/reiserfs/procfs.c
+++ b/fs/reiserfs/procfs.c
@@ -303,11 +303,10 @@ static int show_journal(struct seq_file *m, void *unused)
303 struct reiserfs_sb_info *r = REISERFS_SB(sb); 303 struct reiserfs_sb_info *r = REISERFS_SB(sb);
304 struct reiserfs_super_block *rs = r->s_rs; 304 struct reiserfs_super_block *rs = r->s_rs;
305 struct journal_params *jp = &rs->s_v1.s_journal; 305 struct journal_params *jp = &rs->s_v1.s_journal;
306 char b[BDEVNAME_SIZE];
307 306
308 seq_printf(m, /* on-disk fields */ 307 seq_printf(m, /* on-disk fields */
309 "jp_journal_1st_block: \t%i\n" 308 "jp_journal_1st_block: \t%i\n"
310 "jp_journal_dev: \t%s[%x]\n" 309 "jp_journal_dev: \t%pg[%x]\n"
311 "jp_journal_size: \t%i\n" 310 "jp_journal_size: \t%i\n"
312 "jp_journal_trans_max: \t%i\n" 311 "jp_journal_trans_max: \t%i\n"
313 "jp_journal_magic: \t%i\n" 312 "jp_journal_magic: \t%i\n"
@@ -348,7 +347,7 @@ static int show_journal(struct seq_file *m, void *unused)
348 "prepare: \t%12lu\n" 347 "prepare: \t%12lu\n"
349 "prepare_retry: \t%12lu\n", 348 "prepare_retry: \t%12lu\n",
350 DJP(jp_journal_1st_block), 349 DJP(jp_journal_1st_block),
351 bdevname(SB_JOURNAL(sb)->j_dev_bd, b), 350 SB_JOURNAL(sb)->j_dev_bd,
352 DJP(jp_journal_dev), 351 DJP(jp_journal_dev),
353 DJP(jp_journal_size), 352 DJP(jp_journal_size),
354 DJP(jp_journal_trans_max), 353 DJP(jp_journal_trans_max),
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c
index 5056babe00df..dded920cbc8f 100644
--- a/fs/squashfs/super.c
+++ b/fs/squashfs/super.c
@@ -80,7 +80,6 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)
80{ 80{
81 struct squashfs_sb_info *msblk; 81 struct squashfs_sb_info *msblk;
82 struct squashfs_super_block *sblk = NULL; 82 struct squashfs_super_block *sblk = NULL;
83 char b[BDEVNAME_SIZE];
84 struct inode *root; 83 struct inode *root;
85 long long root_inode; 84 long long root_inode;
86 unsigned short flags; 85 unsigned short flags;
@@ -124,8 +123,8 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)
124 sb->s_magic = le32_to_cpu(sblk->s_magic); 123 sb->s_magic = le32_to_cpu(sblk->s_magic);
125 if (sb->s_magic != SQUASHFS_MAGIC) { 124 if (sb->s_magic != SQUASHFS_MAGIC) {
126 if (!silent) 125 if (!silent)
127 ERROR("Can't find a SQUASHFS superblock on %s\n", 126 ERROR("Can't find a SQUASHFS superblock on %pg\n",
128 bdevname(sb->s_bdev, b)); 127 sb->s_bdev);
129 goto failed_mount; 128 goto failed_mount;
130 } 129 }
131 130
@@ -178,7 +177,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)
178 msblk->inodes = le32_to_cpu(sblk->inodes); 177 msblk->inodes = le32_to_cpu(sblk->inodes);
179 flags = le16_to_cpu(sblk->flags); 178 flags = le16_to_cpu(sblk->flags);
180 179
181 TRACE("Found valid superblock on %s\n", bdevname(sb->s_bdev, b)); 180 TRACE("Found valid superblock on %pg\n", sb->s_bdev);
182 TRACE("Inodes are %scompressed\n", SQUASHFS_UNCOMPRESSED_INODES(flags) 181 TRACE("Inodes are %scompressed\n", SQUASHFS_UNCOMPRESSED_INODES(flags)
183 ? "un" : ""); 182 ? "un" : "");
184 TRACE("Data is %scompressed\n", SQUASHFS_UNCOMPRESSED_DATA(flags) 183 TRACE("Data is %scompressed\n", SQUASHFS_UNCOMPRESSED_DATA(flags)
diff --git a/fs/super.c b/fs/super.c
index 954aeb80e202..cc658a20a29e 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1012,10 +1012,8 @@ struct dentry *mount_bdev(struct file_system_type *fs_type,
1012 blkdev_put(bdev, mode); 1012 blkdev_put(bdev, mode);
1013 down_write(&s->s_umount); 1013 down_write(&s->s_umount);
1014 } else { 1014 } else {
1015 char b[BDEVNAME_SIZE];
1016
1017 s->s_mode = mode; 1015 s->s_mode = mode;
1018 strlcpy(s->s_id, bdevname(bdev, b), sizeof(s->s_id)); 1016 snprintf(s->s_id, sizeof(s->s_id), "%pg", bdev);
1019 sb_set_blocksize(s, block_size(bdev)); 1017 sb_set_blocksize(s, block_size(bdev));
1020 error = fill_super(s, data, flags & MS_SILENT ? 1 : 0); 1018 error = fill_super(s, data, flags & MS_SILENT ? 1 : 0);
1021 if (error) { 1019 if (error) {
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 3243cdf97f33..ace91e7c713e 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1632,13 +1632,9 @@ xfs_setsize_buftarg(
1632 btp->bt_meta_sectormask = sectorsize - 1; 1632 btp->bt_meta_sectormask = sectorsize - 1;
1633 1633
1634 if (set_blocksize(btp->bt_bdev, sectorsize)) { 1634 if (set_blocksize(btp->bt_bdev, sectorsize)) {
1635 char name[BDEVNAME_SIZE];
1636
1637 bdevname(btp->bt_bdev, name);
1638
1639 xfs_warn(btp->bt_mount, 1635 xfs_warn(btp->bt_mount,
1640 "Cannot set_blocksize to %u on device %s", 1636 "Cannot set_blocksize to %u on device %pg",
1641 sectorsize, name); 1637 sectorsize, btp->bt_bdev);
1642 return -EINVAL; 1638 return -EINVAL;
1643 } 1639 }
1644 1640