add patch fix-incorrect-unlock-on-j_list_lock
[ext4-patch-queue.git] / update-logging-style-using-PR_CONT
blob8c63ad901a8fa22256240047f430ca87dc13f9e8
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>
13 ---
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
19 --- a/fs/ext4/super.c
20 +++ b/fs/ext4/super.c
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, ...)
24  {
25 +       struct va_format vaf;
26         va_list args;
28         save_error_info(sb, function, line);
29         va_start(args, fmt);
30 -       printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: ", sb->s_id,
31 -              function, line);
32 -       vprintk(fmt, args);
33 -       printk("\n");
34 +       vaf.fmt = fmt;
35 +       vaf.va = &args;
36 +       printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: %pV\n",
37 +              sb->s_id, function, line, &vaf);
38         va_end(args);
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));
52 -               printk("\n");
53 +               printk(KERN_CONT "\n");
54         }
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));
68 -               printk("\n");
69 +               printk(KERN_CONT "\n");
70         }
71         mod_timer(&sbi->s_err_report, jiffies + 24*60*60*HZ);  /* Once a day */
72  }
73 -- 
74 2.10.0.rc2.1.g053435c