Commit 90804ed6 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull UDF & jbd fixes from Jan Kara:
 "A cleanup of JBD log messages and UDF fix of a lockdep warning"

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  udf: Fix lockdep warning from udf_symlink()
  jbd: Revise KERN_EMERG error messages
parents 30b02c4b 4ea7772f
...@@ -573,7 +573,7 @@ int log_wait_commit(journal_t *journal, tid_t tid) ...@@ -573,7 +573,7 @@ int log_wait_commit(journal_t *journal, tid_t tid)
#ifdef CONFIG_JBD_DEBUG #ifdef CONFIG_JBD_DEBUG
spin_lock(&journal->j_state_lock); spin_lock(&journal->j_state_lock);
if (!tid_geq(journal->j_commit_request, tid)) { if (!tid_geq(journal->j_commit_request, tid)) {
printk(KERN_EMERG printk(KERN_ERR
"%s: error: j_commit_request=%d, tid=%d\n", "%s: error: j_commit_request=%d, tid=%d\n",
__func__, journal->j_commit_request, tid); __func__, journal->j_commit_request, tid);
} }
...@@ -604,10 +604,8 @@ int log_wait_commit(journal_t *journal, tid_t tid) ...@@ -604,10 +604,8 @@ int log_wait_commit(journal_t *journal, tid_t tid)
out_unlock: out_unlock:
spin_unlock(&journal->j_state_lock); spin_unlock(&journal->j_state_lock);
if (unlikely(is_journal_aborted(journal))) { if (unlikely(is_journal_aborted(journal)))
printk(KERN_EMERG "journal commit I/O error\n");
err = -EIO; err = -EIO;
}
return err; return err;
} }
...@@ -2136,7 +2134,7 @@ static void __exit journal_exit(void) ...@@ -2136,7 +2134,7 @@ static void __exit journal_exit(void)
#ifdef CONFIG_JBD_DEBUG #ifdef CONFIG_JBD_DEBUG
int n = atomic_read(&nr_journal_heads); int n = atomic_read(&nr_journal_heads);
if (n) if (n)
printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n); printk(KERN_ERR "JBD: leaked %d journal_heads!\n", n);
#endif #endif
jbd_remove_debugfs_entry(); jbd_remove_debugfs_entry();
journal_destroy_caches(); journal_destroy_caches();
......
...@@ -675,7 +675,7 @@ do_get_write_access(handle_t *handle, struct journal_head *jh, ...@@ -675,7 +675,7 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
jbd_alloc(jh2bh(jh)->b_size, jbd_alloc(jh2bh(jh)->b_size,
GFP_NOFS); GFP_NOFS);
if (!frozen_buffer) { if (!frozen_buffer) {
printk(KERN_EMERG printk(KERN_ERR
"%s: OOM for frozen_buffer\n", "%s: OOM for frozen_buffer\n",
__func__); __func__);
JBUFFER_TRACE(jh, "oom!"); JBUFFER_TRACE(jh, "oom!");
...@@ -898,7 +898,7 @@ int journal_get_undo_access(handle_t *handle, struct buffer_head *bh) ...@@ -898,7 +898,7 @@ int journal_get_undo_access(handle_t *handle, struct buffer_head *bh)
if (!jh->b_committed_data) { if (!jh->b_committed_data) {
committed_data = jbd_alloc(jh2bh(jh)->b_size, GFP_NOFS); committed_data = jbd_alloc(jh2bh(jh)->b_size, GFP_NOFS);
if (!committed_data) { if (!committed_data) {
printk(KERN_EMERG "%s: No memory for committed data\n", printk(KERN_ERR "%s: No memory for committed data\n",
__func__); __func__);
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
......
...@@ -1010,6 +1010,7 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry, ...@@ -1010,6 +1010,7 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry,
else else
udf_truncate_tail_extent(inode); udf_truncate_tail_extent(inode);
mark_inode_dirty(inode); mark_inode_dirty(inode);
up_write(&iinfo->i_data_sem);
fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err); fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err);
if (!fi) if (!fi)
...@@ -1023,7 +1024,6 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry, ...@@ -1023,7 +1024,6 @@ static int udf_symlink(struct inode *dir, struct dentry *dentry,
udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL); udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL);
if (UDF_I(dir)->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) if (UDF_I(dir)->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB)
mark_inode_dirty(dir); mark_inode_dirty(dir);
up_write(&iinfo->i_data_sem);
if (fibh.sbh != fibh.ebh) if (fibh.sbh != fibh.ebh)
brelse(fibh.ebh); brelse(fibh.ebh);
brelse(fibh.sbh); brelse(fibh.sbh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment