if( !IS_ERR( journal -> j_dev_file ) ) {
struct inode *jdev_inode = journal->j_dev_file->f_mapping->host;
if( !S_ISBLK( jdev_inode -> i_mode ) ) {
- reiserfs_warning (super, "journal_init_dev: '%s' is "
- "not a block device", jdev_name );
+ reiserfs_warning(super, "journal_init_dev: '%s' is "
+ "not a block device", jdev_name );
result = -ENOTBLK;
+ release_journal_dev( super, journal );
} else {
/* ok */
journal->j_dev_bd = I_BDEV(jdev_inode);
set_blocksize(journal->j_dev_bd, super->s_blocksize);
+ reiserfs_info(super, "journal_init_dev: journal device: %s\n",
+ bdevname(journal->j_dev_bd, b));
}
} else {
result = PTR_ERR( journal -> j_dev_file );
"journal_init_dev: Cannot open '%s': %i",
jdev_name, result );
}
- if( result != 0 ) {
- release_journal_dev( super, journal );
- }
- reiserfs_info(super, "journal_init_dev: journal device: %s\n",
- bdevname(journal->j_dev_bd, b));
return result;
}