jbd2: Fix oops with jbd-stats-through-procfs and external journal From: Eric Sandeen When using an external device for the journal, jbd2_stats_proc_init() wants to use journal->j_dev in its call to bdevname() but it's not assigned yet, resulting in an oops. Signed-off-by: Eric Sandeen Signed-off-by: Mingming Cao --- fs/jbd2/journal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.24-rc1/fs/jbd2/journal.c =================================================================== --- linux-2.6.24-rc1.orig/fs/jbd2/journal.c 2007-10-25 12:07:25.000000000 -0700 +++ linux-2.6.24-rc1/fs/jbd2/journal.c 2007-10-25 12:07:26.000000000 -0700 @@ -1034,11 +1034,11 @@ journal_t * jbd2_journal_init_dev(struct journal = NULL; goto out; } - jbd2_stats_proc_init(journal); journal->j_dev = bdev; journal->j_fs_dev = fs_dev; journal->j_blk_offset = start; journal->j_maxlen = len; + jbd2_stats_proc_init(journal); bh = __getblk(journal->j_dev, start, journal->j_blocksize); J_ASSERT(bh != NULL);