aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/journal.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/journal.c')
-rw-r--r--fs/reiserfs/journal.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index c9ad3a7849f4..3072cfdee959 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -2306,13 +2306,16 @@ static int journal_init_dev( struct super_block *super,
2306 if( !IS_ERR( journal -> j_dev_file ) ) { 2306 if( !IS_ERR( journal -> j_dev_file ) ) {
2307 struct inode *jdev_inode = journal->j_dev_file->f_mapping->host; 2307 struct inode *jdev_inode = journal->j_dev_file->f_mapping->host;
2308 if( !S_ISBLK( jdev_inode -> i_mode ) ) { 2308 if( !S_ISBLK( jdev_inode -> i_mode ) ) {
2309 reiserfs_warning (super, "journal_init_dev: '%s' is " 2309 reiserfs_warning(super, "journal_init_dev: '%s' is "
2310 "not a block device", jdev_name ); 2310 "not a block device", jdev_name );
2311 result = -ENOTBLK; 2311 result = -ENOTBLK;
2312 release_journal_dev( super, journal );
2312 } else { 2313 } else {
2313 /* ok */ 2314 /* ok */
2314 journal->j_dev_bd = I_BDEV(jdev_inode); 2315 journal->j_dev_bd = I_BDEV(jdev_inode);
2315 set_blocksize(journal->j_dev_bd, super->s_blocksize); 2316 set_blocksize(journal->j_dev_bd, super->s_blocksize);
2317 reiserfs_info(super, "journal_init_dev: journal device: %s\n",
2318 bdevname(journal->j_dev_bd, b));
2316 } 2319 }
2317 } else { 2320 } else {
2318 result = PTR_ERR( journal -> j_dev_file ); 2321 result = PTR_ERR( journal -> j_dev_file );
@@ -2321,11 +2324,6 @@ static int journal_init_dev( struct super_block *super,
2321 "journal_init_dev: Cannot open '%s': %i", 2324 "journal_init_dev: Cannot open '%s': %i",
2322 jdev_name, result ); 2325 jdev_name, result );
2323 } 2326 }
2324 if( result != 0 ) {
2325 release_journal_dev( super, journal );
2326 }
2327 reiserfs_info(super, "journal_init_dev: journal device: %s\n",
2328 bdevname(journal->j_dev_bd, b));
2329 return result; 2327 return result;
2330} 2328}
2331 2329
@@ -2393,7 +2391,7 @@ int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_fo
2393 jh = (struct reiserfs_journal_header *)(bhjh->b_data); 2391 jh = (struct reiserfs_journal_header *)(bhjh->b_data);
2394 2392
2395 /* make sure that journal matches to the super block */ 2393 /* make sure that journal matches to the super block */
2396 if (is_reiserfs_jr(rs) && (jh->jh_journal.jp_journal_magic != sb_jp_journal_magic(rs))) { 2394 if (is_reiserfs_jr(rs) && (le32_to_cpu(jh->jh_journal.jp_journal_magic) != sb_jp_journal_magic(rs))) {
2397 reiserfs_warning (p_s_sb, "sh-460: journal header magic %x " 2395 reiserfs_warning (p_s_sb, "sh-460: journal header magic %x "
2398 "(device %s) does not match to magic found in super " 2396 "(device %s) does not match to magic found in super "
2399 "block %x", 2397 "block %x",