1 ext4: super.c: Update logging style using KERN_CONT
3 From: Joe Perches <joe@perches.com>
5 Recent commit require line continuing printks to use PR_CONT.
7 Update super.c to use KERN_CONT and use vsprintf extension %pV to
8 avoid a printk/vprintk/printk("\n") sequence as well.
10 Signed-off-by: Joe Perches <joe@perches.com>
11 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
12 Reviewed-by: Jan Kara <jack@suse.cz>
14 fs/ext4/super.c | 21 +++++++++++----------
15 1 file changed, 11 insertions(+), 10 deletions(-)
17 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
18 index 6db81fbcbaa6..20da99da0a34 100644
21 @@ -597,14 +597,15 @@ void __ext4_std_error(struct super_block *sb, const char *function,
22 void __ext4_abort(struct super_block *sb, const char *function,
23 unsigned int line, const char *fmt, ...)
25 + struct va_format vaf;
28 save_error_info(sb, function, line);
30 - printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: ", sb->s_id,
36 + printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: %pV\n",
37 + sb->s_id, function, line, &vaf);
40 if ((sb->s_flags & MS_RDONLY) == 0) {
41 @@ -2715,12 +2716,12 @@ static void print_daily_error_info(unsigned long arg)
42 es->s_first_error_func,
43 le32_to_cpu(es->s_first_error_line));
44 if (es->s_first_error_ino)
45 - printk(": inode %u",
46 + printk(KERN_CONT ": inode %u",
47 le32_to_cpu(es->s_first_error_ino));
48 if (es->s_first_error_block)
49 - printk(": block %llu", (unsigned long long)
50 + printk(KERN_CONT ": block %llu", (unsigned long long)
51 le64_to_cpu(es->s_first_error_block));
53 + printk(KERN_CONT "\n");
55 if (es->s_last_error_time) {
56 printk(KERN_NOTICE "EXT4-fs (%s): last error at time %u: %.*s:%d",
57 @@ -2729,12 +2730,12 @@ static void print_daily_error_info(unsigned long arg)
58 es->s_last_error_func,
59 le32_to_cpu(es->s_last_error_line));
60 if (es->s_last_error_ino)
61 - printk(": inode %u",
62 + printk(KERN_CONT ": inode %u",
63 le32_to_cpu(es->s_last_error_ino));
64 if (es->s_last_error_block)
65 - printk(": block %llu", (unsigned long long)
66 + printk(KERN_CONT ": block %llu", (unsigned long long)
67 le64_to_cpu(es->s_last_error_block));
69 + printk(KERN_CONT "\n");
71 mod_timer(&sbi->s_err_report, jiffies + 24*60*60*HZ); /* Once a day */