@@ -2386,7 +2386,7 @@ static int journal_read(struct super_block *sb)
23862386
23872387 cur_dblock = SB_ONDISK_JOURNAL_1st_BLOCK (sb );
23882388 reiserfs_info (sb , "checking transaction log (%pg)\n" ,
2389- journal -> j_bdev_handle -> bdev );
2389+ file_bdev ( journal -> j_bdev_file ) );
23902390 start = ktime_get_seconds ();
23912391
23922392 /*
@@ -2447,7 +2447,7 @@ static int journal_read(struct super_block *sb)
24472447 * device and journal device to be the same
24482448 */
24492449 d_bh =
2450- reiserfs_breada (journal -> j_bdev_handle -> bdev , cur_dblock ,
2450+ reiserfs_breada (file_bdev ( journal -> j_bdev_file ) , cur_dblock ,
24512451 sb -> s_blocksize ,
24522452 SB_ONDISK_JOURNAL_1st_BLOCK (sb ) +
24532453 SB_ONDISK_JOURNAL_SIZE (sb ));
@@ -2588,9 +2588,9 @@ static void journal_list_init(struct super_block *sb)
25882588
25892589static void release_journal_dev (struct reiserfs_journal * journal )
25902590{
2591- if (journal -> j_bdev_handle ) {
2592- bdev_release (journal -> j_bdev_handle );
2593- journal -> j_bdev_handle = NULL ;
2591+ if (journal -> j_bdev_file ) {
2592+ fput (journal -> j_bdev_file );
2593+ journal -> j_bdev_file = NULL ;
25942594 }
25952595}
25962596
@@ -2605,7 +2605,7 @@ static int journal_init_dev(struct super_block *super,
26052605
26062606 result = 0 ;
26072607
2608- journal -> j_bdev_handle = NULL ;
2608+ journal -> j_bdev_file = NULL ;
26092609 jdev = SB_ONDISK_JOURNAL_DEVICE (super ) ?
26102610 new_decode_dev (SB_ONDISK_JOURNAL_DEVICE (super )) : super -> s_dev ;
26112611
@@ -2616,37 +2616,37 @@ static int journal_init_dev(struct super_block *super,
26162616 if ((!jdev_name || !jdev_name [0 ])) {
26172617 if (jdev == super -> s_dev )
26182618 holder = NULL ;
2619- journal -> j_bdev_handle = bdev_open_by_dev (jdev , blkdev_mode ,
2619+ journal -> j_bdev_file = bdev_file_open_by_dev (jdev , blkdev_mode ,
26202620 holder , NULL );
2621- if (IS_ERR (journal -> j_bdev_handle )) {
2622- result = PTR_ERR (journal -> j_bdev_handle );
2623- journal -> j_bdev_handle = NULL ;
2621+ if (IS_ERR (journal -> j_bdev_file )) {
2622+ result = PTR_ERR (journal -> j_bdev_file );
2623+ journal -> j_bdev_file = NULL ;
26242624 reiserfs_warning (super , "sh-458" ,
26252625 "cannot init journal device unknown-block(%u,%u): %i" ,
26262626 MAJOR (jdev ), MINOR (jdev ), result );
26272627 return result ;
26282628 } else if (jdev != super -> s_dev )
2629- set_blocksize (journal -> j_bdev_handle -> bdev ,
2629+ set_blocksize (file_bdev ( journal -> j_bdev_file ) ,
26302630 super -> s_blocksize );
26312631
26322632 return 0 ;
26332633 }
26342634
2635- journal -> j_bdev_handle = bdev_open_by_path (jdev_name , blkdev_mode ,
2635+ journal -> j_bdev_file = bdev_file_open_by_path (jdev_name , blkdev_mode ,
26362636 holder , NULL );
2637- if (IS_ERR (journal -> j_bdev_handle )) {
2638- result = PTR_ERR (journal -> j_bdev_handle );
2639- journal -> j_bdev_handle = NULL ;
2637+ if (IS_ERR (journal -> j_bdev_file )) {
2638+ result = PTR_ERR (journal -> j_bdev_file );
2639+ journal -> j_bdev_file = NULL ;
26402640 reiserfs_warning (super , "sh-457" ,
26412641 "journal_init_dev: Cannot open '%s': %i" ,
26422642 jdev_name , result );
26432643 return result ;
26442644 }
26452645
2646- set_blocksize (journal -> j_bdev_handle -> bdev , super -> s_blocksize );
2646+ set_blocksize (file_bdev ( journal -> j_bdev_file ) , super -> s_blocksize );
26472647 reiserfs_info (super ,
26482648 "journal_init_dev: journal device: %pg\n" ,
2649- journal -> j_bdev_handle -> bdev );
2649+ file_bdev ( journal -> j_bdev_file ) );
26502650 return 0 ;
26512651}
26522652
@@ -2804,7 +2804,7 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
28042804 "journal header magic %x (device %pg) does "
28052805 "not match to magic found in super block %x" ,
28062806 jh -> jh_journal .jp_journal_magic ,
2807- journal -> j_bdev_handle -> bdev ,
2807+ file_bdev ( journal -> j_bdev_file ) ,
28082808 sb_jp_journal_magic (rs ));
28092809 brelse (bhjh );
28102810 goto free_and_return ;
@@ -2828,7 +2828,7 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
28282828 reiserfs_info (sb , "journal params: device %pg, size %u, "
28292829 "journal first block %u, max trans len %u, max batch %u, "
28302830 "max commit age %u, max trans age %u\n" ,
2831- journal -> j_bdev_handle -> bdev ,
2831+ file_bdev ( journal -> j_bdev_file ) ,
28322832 SB_ONDISK_JOURNAL_SIZE (sb ),
28332833 SB_ONDISK_JOURNAL_1st_BLOCK (sb ),
28342834 journal -> j_trans_max ,
0 commit comments