Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Nov 2012 01:42:07 +0000 (17:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Nov 2012 01:42:07 +0000 (17:42 -0800)
Pull ext3 regression fix from Jan Kara:
 "Fix an ext3 regression introduced during 3.7 merge window.  It leads
  to deadlock if you stress the filesystem in the right way (luckily
  only if blocksize < pagesize)."

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  jbd: Fix lock ordering bug in journal_unmap_buffer()

fs/jbd/transaction.c

index 78b7f84241d47b6b6503df68935f790bccd58ee9..7f5120bf0ec29cff214cc8ccb2a23bfb02ad3419 100644 (file)
@@ -1961,7 +1961,9 @@ retry:
                        spin_unlock(&journal->j_list_lock);
                        jbd_unlock_bh_state(bh);
                        spin_unlock(&journal->j_state_lock);
+                       unlock_buffer(bh);
                        log_wait_commit(journal, tid);
+                       lock_buffer(bh);
                        goto retry;
                }
                /*