diff options
-rw-r--r-- | fs/jbd/journal.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index 2fc66c3e6681..7af6099c911c 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c | |||
@@ -715,18 +715,8 @@ journal_t * journal_init_dev(struct block_device *bdev, | |||
715 | if (!journal) | 715 | if (!journal) |
716 | return NULL; | 716 | return NULL; |
717 | 717 | ||
718 | journal->j_dev = bdev; | ||
719 | journal->j_fs_dev = fs_dev; | ||
720 | journal->j_blk_offset = start; | ||
721 | journal->j_maxlen = len; | ||
722 | journal->j_blocksize = blocksize; | ||
723 | |||
724 | bh = __getblk(journal->j_dev, start, journal->j_blocksize); | ||
725 | J_ASSERT(bh != NULL); | ||
726 | journal->j_sb_buffer = bh; | ||
727 | journal->j_superblock = (journal_superblock_t *)bh->b_data; | ||
728 | |||
729 | /* journal descriptor can store up to n blocks -bzzz */ | 718 | /* journal descriptor can store up to n blocks -bzzz */ |
719 | journal->j_blocksize = blocksize; | ||
730 | n = journal->j_blocksize / sizeof(journal_block_tag_t); | 720 | n = journal->j_blocksize / sizeof(journal_block_tag_t); |
731 | journal->j_wbufsize = n; | 721 | journal->j_wbufsize = n; |
732 | journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL); | 722 | journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL); |
@@ -736,6 +726,15 @@ journal_t * journal_init_dev(struct block_device *bdev, | |||
736 | kfree(journal); | 726 | kfree(journal); |
737 | journal = NULL; | 727 | journal = NULL; |
738 | } | 728 | } |
729 | journal->j_dev = bdev; | ||
730 | journal->j_fs_dev = fs_dev; | ||
731 | journal->j_blk_offset = start; | ||
732 | journal->j_maxlen = len; | ||
733 | |||
734 | bh = __getblk(journal->j_dev, start, journal->j_blocksize); | ||
735 | J_ASSERT(bh != NULL); | ||
736 | journal->j_sb_buffer = bh; | ||
737 | journal->j_superblock = (journal_superblock_t *)bh->b_data; | ||
739 | 738 | ||
740 | return journal; | 739 | return journal; |
741 | } | 740 | } |