Commit d62b7983 authored by Andrew Morton's avatar Andrew Morton Committed by David Mosberger

[PATCH] ext3: fix deadlock in journal_create()

From: Mark Fasheh <mark.fasheh@oracle.com>

journal_create() is called under down_write(s_umount) on the mount path.  But
it calls fsync_bdev(), which wants down_write(s_umount).

Change journal_create() to run sync_blockdev() instead.  Just to write out
the new journal's blocks.
parent 0b642bb2
......@@ -916,7 +916,7 @@ int journal_create(journal_t *journal)
__brelse(bh);
}
fsync_bdev(journal->j_dev);
sync_blockdev(journal->j_dev);
jbd_debug(1, "JBD: journal cleared.\n");
/* OK, fill in the initial static fields in the new superblock */
......
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