@@ -2386,7 +2386,7 @@ static int journal_read(struct super_block *sb)
2386
2386
2387
2387
cur_dblock = SB_ONDISK_JOURNAL_1st_BLOCK (sb );
2388
2388
reiserfs_info (sb , "checking transaction log (%pg)\n" ,
2389
- journal -> j_bdev_handle -> bdev );
2389
+ file_bdev ( journal -> j_bdev_file ) );
2390
2390
start = ktime_get_seconds ();
2391
2391
2392
2392
/*
@@ -2447,7 +2447,7 @@ static int journal_read(struct super_block *sb)
2447
2447
* device and journal device to be the same
2448
2448
*/
2449
2449
d_bh =
2450
- reiserfs_breada (journal -> j_bdev_handle -> bdev , cur_dblock ,
2450
+ reiserfs_breada (file_bdev ( journal -> j_bdev_file ) , cur_dblock ,
2451
2451
sb -> s_blocksize ,
2452
2452
SB_ONDISK_JOURNAL_1st_BLOCK (sb ) +
2453
2453
SB_ONDISK_JOURNAL_SIZE (sb ));
@@ -2588,9 +2588,9 @@ static void journal_list_init(struct super_block *sb)
2588
2588
2589
2589
static void release_journal_dev (struct reiserfs_journal * journal )
2590
2590
{
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 ;
2594
2594
}
2595
2595
}
2596
2596
@@ -2605,7 +2605,7 @@ static int journal_init_dev(struct super_block *super,
2605
2605
2606
2606
result = 0 ;
2607
2607
2608
- journal -> j_bdev_handle = NULL ;
2608
+ journal -> j_bdev_file = NULL ;
2609
2609
jdev = SB_ONDISK_JOURNAL_DEVICE (super ) ?
2610
2610
new_decode_dev (SB_ONDISK_JOURNAL_DEVICE (super )) : super -> s_dev ;
2611
2611
@@ -2616,37 +2616,37 @@ static int journal_init_dev(struct super_block *super,
2616
2616
if ((!jdev_name || !jdev_name [0 ])) {
2617
2617
if (jdev == super -> s_dev )
2618
2618
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 ,
2620
2620
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 ;
2624
2624
reiserfs_warning (super , "sh-458" ,
2625
2625
"cannot init journal device unknown-block(%u,%u): %i" ,
2626
2626
MAJOR (jdev ), MINOR (jdev ), result );
2627
2627
return result ;
2628
2628
} else if (jdev != super -> s_dev )
2629
- set_blocksize (journal -> j_bdev_handle -> bdev ,
2629
+ set_blocksize (file_bdev ( journal -> j_bdev_file ) ,
2630
2630
super -> s_blocksize );
2631
2631
2632
2632
return 0 ;
2633
2633
}
2634
2634
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 ,
2636
2636
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 ;
2640
2640
reiserfs_warning (super , "sh-457" ,
2641
2641
"journal_init_dev: Cannot open '%s': %i" ,
2642
2642
jdev_name , result );
2643
2643
return result ;
2644
2644
}
2645
2645
2646
- set_blocksize (journal -> j_bdev_handle -> bdev , super -> s_blocksize );
2646
+ set_blocksize (file_bdev ( journal -> j_bdev_file ) , super -> s_blocksize );
2647
2647
reiserfs_info (super ,
2648
2648
"journal_init_dev: journal device: %pg\n" ,
2649
- journal -> j_bdev_handle -> bdev );
2649
+ file_bdev ( journal -> j_bdev_file ) );
2650
2650
return 0 ;
2651
2651
}
2652
2652
@@ -2804,7 +2804,7 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
2804
2804
"journal header magic %x (device %pg) does "
2805
2805
"not match to magic found in super block %x" ,
2806
2806
jh -> jh_journal .jp_journal_magic ,
2807
- journal -> j_bdev_handle -> bdev ,
2807
+ file_bdev ( journal -> j_bdev_file ) ,
2808
2808
sb_jp_journal_magic (rs ));
2809
2809
brelse (bhjh );
2810
2810
goto free_and_return ;
@@ -2828,7 +2828,7 @@ int journal_init(struct super_block *sb, const char *j_dev_name,
2828
2828
reiserfs_info (sb , "journal params: device %pg, size %u, "
2829
2829
"journal first block %u, max trans len %u, max batch %u, "
2830
2830
"max commit age %u, max trans age %u\n" ,
2831
- journal -> j_bdev_handle -> bdev ,
2831
+ file_bdev ( journal -> j_bdev_file ) ,
2832
2832
SB_ONDISK_JOURNAL_SIZE (sb ),
2833
2833
SB_ONDISK_JOURNAL_1st_BLOCK (sb ),
2834
2834
journal -> j_trans_max ,
0 commit comments