diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/reiserfs/journal.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index c9ad3a7849f4..b16d65acb550 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 | ||