Skip to content

Commit 651e1c3

Browse files
JoePerchestytso
authored andcommitted
ext4: super.c: Update logging style using KERN_CONT
Recent commit require line continuing printks to use PR_CONT. Update super.c to use KERN_CONT and use vsprintf extension %pV to avoid a printk/vprintk/printk("\n") sequence as well. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
1 parent b67be92 commit 651e1c3

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

fs/ext4/super.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -597,14 +597,15 @@ void __ext4_std_error(struct super_block *sb, const char *function,
597597
void __ext4_abort(struct super_block *sb, const char *function,
598598
unsigned int line, const char *fmt, ...)
599599
{
600+
struct va_format vaf;
600601
va_list args;
601602

602603
save_error_info(sb, function, line);
603604
va_start(args, fmt);
604-
printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: ", sb->s_id,
605-
function, line);
606-
vprintk(fmt, args);
607-
printk("\n");
605+
vaf.fmt = fmt;
606+
vaf.va = &args;
607+
printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: %pV\n",
608+
sb->s_id, function, line, &vaf);
608609
va_end(args);
609610

610611
if ((sb->s_flags & MS_RDONLY) == 0) {
@@ -2715,12 +2716,12 @@ static void print_daily_error_info(unsigned long arg)
27152716
es->s_first_error_func,
27162717
le32_to_cpu(es->s_first_error_line));
27172718
if (es->s_first_error_ino)
2718-
printk(": inode %u",
2719+
printk(KERN_CONT ": inode %u",
27192720
le32_to_cpu(es->s_first_error_ino));
27202721
if (es->s_first_error_block)
2721-
printk(": block %llu", (unsigned long long)
2722+
printk(KERN_CONT ": block %llu", (unsigned long long)
27222723
le64_to_cpu(es->s_first_error_block));
2723-
printk("\n");
2724+
printk(KERN_CONT "\n");
27242725
}
27252726
if (es->s_last_error_time) {
27262727
printk(KERN_NOTICE "EXT4-fs (%s): last error at time %u: %.*s:%d",
@@ -2729,12 +2730,12 @@ static void print_daily_error_info(unsigned long arg)
27292730
es->s_last_error_func,
27302731
le32_to_cpu(es->s_last_error_line));
27312732
if (es->s_last_error_ino)
2732-
printk(": inode %u",
2733+
printk(KERN_CONT ": inode %u",
27332734
le32_to_cpu(es->s_last_error_ino));
27342735
if (es->s_last_error_block)
2735-
printk(": block %llu", (unsigned long long)
2736+
printk(KERN_CONT ": block %llu", (unsigned long long)
27362737
le64_to_cpu(es->s_last_error_block));
2737-
printk("\n");
2738+
printk(KERN_CONT "\n");
27382739
}
27392740
mod_timer(&sbi->s_err_report, jiffies + 24*60*60*HZ); /* Once a day */
27402741
}

0 commit comments

Comments
 (0)