Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

jbd: Revise KERN_EMERG error messages

Some of KERN_EMERG printk messages do not really deserve this log level
and the one in log_wait_commit() is even rather useless (the journal has
been previously aborted and *that* is where we should have been
complaining). So make some messages just KERN_ERR and remove the useless
message.

Signed-off-by: Jan Kara <jack@suse.cz>

Jan Kara 301d4c9a df4e7ac0

+5 -7
+3 -5
fs/jbd/journal.c
··· 573 573 #ifdef CONFIG_JBD_DEBUG 574 574 spin_lock(&journal->j_state_lock); 575 575 if (!tid_geq(journal->j_commit_request, tid)) { 576 - printk(KERN_EMERG 576 + printk(KERN_ERR 577 577 "%s: error: j_commit_request=%d, tid=%d\n", 578 578 __func__, journal->j_commit_request, tid); 579 579 } ··· 604 604 out_unlock: 605 605 spin_unlock(&journal->j_state_lock); 606 606 607 - if (unlikely(is_journal_aborted(journal))) { 608 - printk(KERN_EMERG "journal commit I/O error\n"); 607 + if (unlikely(is_journal_aborted(journal))) 609 608 err = -EIO; 610 - } 611 609 return err; 612 610 } 613 611 ··· 2134 2136 #ifdef CONFIG_JBD_DEBUG 2135 2137 int n = atomic_read(&nr_journal_heads); 2136 2138 if (n) 2137 - printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n); 2139 + printk(KERN_ERR "JBD: leaked %d journal_heads!\n", n); 2138 2140 #endif 2139 2141 jbd_remove_debugfs_entry(); 2140 2142 journal_destroy_caches();
+2 -2
fs/jbd/transaction.c
··· 675 675 jbd_alloc(jh2bh(jh)->b_size, 676 676 GFP_NOFS); 677 677 if (!frozen_buffer) { 678 - printk(KERN_EMERG 678 + printk(KERN_ERR 679 679 "%s: OOM for frozen_buffer\n", 680 680 __func__); 681 681 JBUFFER_TRACE(jh, "oom!"); ··· 898 898 if (!jh->b_committed_data) { 899 899 committed_data = jbd_alloc(jh2bh(jh)->b_size, GFP_NOFS); 900 900 if (!committed_data) { 901 - printk(KERN_EMERG "%s: No memory for committed data\n", 901 + printk(KERN_ERR "%s: No memory for committed data\n", 902 902 __func__); 903 903 err = -ENOMEM; 904 904 goto out;