diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 21 |
1 files changed, 6 insertions, 15 deletions
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 | ||
135 | static void buffer_io_error(struct buffer_head *bh, char *msg) | 135 | static 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 | } |
251 | out_unlock: | 246 | out_unlock: |
@@ -531,10 +526,8 @@ repeat: | |||
531 | 526 | ||
532 | static void do_thaw_one(struct super_block *sb, void *unused) | 527 | static 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 | ||
540 | static void do_thaw_all(struct work_struct *work) | 533 | static 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 | ||