Skip to content

Commit

Permalink
jbd: Revise KERN_EMERG error messages
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jankara committed Dec 4, 2013
1 parent df4e7ac commit 301d4c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions fs/jbd/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ int log_wait_commit(journal_t *journal, tid_t tid)
#ifdef CONFIG_JBD_DEBUG
spin_lock(&journal->j_state_lock);
if (!tid_geq(journal->j_commit_request, tid)) {
printk(KERN_EMERG
printk(KERN_ERR
"%s: error: j_commit_request=%d, tid=%d\n",
__func__, journal->j_commit_request, tid);
}
Expand Down Expand Up @@ -604,10 +604,8 @@ int log_wait_commit(journal_t *journal, tid_t tid)
out_unlock:
spin_unlock(&journal->j_state_lock);

if (unlikely(is_journal_aborted(journal))) {
printk(KERN_EMERG "journal commit I/O error\n");
if (unlikely(is_journal_aborted(journal)))
err = -EIO;
}
return err;
}

Expand Down Expand Up @@ -2136,7 +2134,7 @@ static void __exit journal_exit(void)
#ifdef CONFIG_JBD_DEBUG
int n = atomic_read(&nr_journal_heads);
if (n)
printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n);
printk(KERN_ERR "JBD: leaked %d journal_heads!\n", n);
#endif
jbd_remove_debugfs_entry();
journal_destroy_caches();
Expand Down
4 changes: 2 additions & 2 deletions fs/jbd/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
jbd_alloc(jh2bh(jh)->b_size,
GFP_NOFS);
if (!frozen_buffer) {
printk(KERN_EMERG
printk(KERN_ERR
"%s: OOM for frozen_buffer\n",
__func__);
JBUFFER_TRACE(jh, "oom!");
Expand Down Expand Up @@ -898,7 +898,7 @@ int journal_get_undo_access(handle_t *handle, struct buffer_head *bh)
if (!jh->b_committed_data) {
committed_data = jbd_alloc(jh2bh(jh)->b_size, GFP_NOFS);
if (!committed_data) {
printk(KERN_EMERG "%s: No memory for committed data\n",
printk(KERN_ERR "%s: No memory for committed data\n",
__func__);
err = -ENOMEM;
goto out;
Expand Down

0 comments on commit 301d4c9

Please sign in to comment.