@@ -1058,7 +1058,7 @@ void jfs_syncpt(struct jfs_log *log, int hard_sync)
1058
1058
int lmLogOpen (struct super_block * sb )
1059
1059
{
1060
1060
int rc ;
1061
- struct bdev_handle * bdev_handle ;
1061
+ struct file * bdev_file ;
1062
1062
struct jfs_log * log ;
1063
1063
struct jfs_sb_info * sbi = JFS_SBI (sb );
1064
1064
@@ -1070,7 +1070,7 @@ int lmLogOpen(struct super_block *sb)
1070
1070
1071
1071
mutex_lock (& jfs_log_mutex );
1072
1072
list_for_each_entry (log , & jfs_external_logs , journal_list ) {
1073
- if (log -> bdev_handle -> bdev -> bd_dev == sbi -> logdev ) {
1073
+ if (file_bdev ( log -> bdev_file ) -> bd_dev == sbi -> logdev ) {
1074
1074
if (!uuid_equal (& log -> uuid , & sbi -> loguuid )) {
1075
1075
jfs_warn ("wrong uuid on JFS journal" );
1076
1076
mutex_unlock (& jfs_log_mutex );
@@ -1100,14 +1100,14 @@ int lmLogOpen(struct super_block *sb)
1100
1100
* file systems to log may have n-to-1 relationship;
1101
1101
*/
1102
1102
1103
- bdev_handle = bdev_open_by_dev (sbi -> logdev ,
1103
+ bdev_file = bdev_file_open_by_dev (sbi -> logdev ,
1104
1104
BLK_OPEN_READ | BLK_OPEN_WRITE , log , NULL );
1105
- if (IS_ERR (bdev_handle )) {
1106
- rc = PTR_ERR (bdev_handle );
1105
+ if (IS_ERR (bdev_file )) {
1106
+ rc = PTR_ERR (bdev_file );
1107
1107
goto free ;
1108
1108
}
1109
1109
1110
- log -> bdev_handle = bdev_handle ;
1110
+ log -> bdev_file = bdev_file ;
1111
1111
uuid_copy (& log -> uuid , & sbi -> loguuid );
1112
1112
1113
1113
/*
@@ -1141,7 +1141,7 @@ int lmLogOpen(struct super_block *sb)
1141
1141
lbmLogShutdown (log );
1142
1142
1143
1143
close : /* close external log device */
1144
- bdev_release ( bdev_handle );
1144
+ fput ( bdev_file );
1145
1145
1146
1146
free : /* free log descriptor */
1147
1147
mutex_unlock (& jfs_log_mutex );
@@ -1162,7 +1162,7 @@ static int open_inline_log(struct super_block *sb)
1162
1162
init_waitqueue_head (& log -> syncwait );
1163
1163
1164
1164
set_bit (log_INLINELOG , & log -> flag );
1165
- log -> bdev_handle = sb_bdev_handle ( sb ) ;
1165
+ log -> bdev_file = sb -> s_bdev_file ;
1166
1166
log -> base = addressPXD (& JFS_SBI (sb )-> logpxd );
1167
1167
log -> size = lengthPXD (& JFS_SBI (sb )-> logpxd ) >>
1168
1168
(L2LOGPSIZE - sb -> s_blocksize_bits );
@@ -1436,7 +1436,7 @@ int lmLogClose(struct super_block *sb)
1436
1436
{
1437
1437
struct jfs_sb_info * sbi = JFS_SBI (sb );
1438
1438
struct jfs_log * log = sbi -> log ;
1439
- struct bdev_handle * bdev_handle ;
1439
+ struct file * bdev_file ;
1440
1440
int rc = 0 ;
1441
1441
1442
1442
jfs_info ("lmLogClose: log:0x%p" , log );
@@ -1482,10 +1482,10 @@ int lmLogClose(struct super_block *sb)
1482
1482
* external log as separate logical volume
1483
1483
*/
1484
1484
list_del (& log -> journal_list );
1485
- bdev_handle = log -> bdev_handle ;
1485
+ bdev_file = log -> bdev_file ;
1486
1486
rc = lmLogShutdown (log );
1487
1487
1488
- bdev_release ( bdev_handle );
1488
+ fput ( bdev_file );
1489
1489
1490
1490
kfree (log );
1491
1491
@@ -1972,7 +1972,7 @@ static int lbmRead(struct jfs_log * log, int pn, struct lbuf ** bpp)
1972
1972
1973
1973
bp -> l_flag |= lbmREAD ;
1974
1974
1975
- bio = bio_alloc (log -> bdev_handle -> bdev , 1 , REQ_OP_READ , GFP_NOFS );
1975
+ bio = bio_alloc (file_bdev ( log -> bdev_file ) , 1 , REQ_OP_READ , GFP_NOFS );
1976
1976
bio -> bi_iter .bi_sector = bp -> l_blkno << (log -> l2bsize - 9 );
1977
1977
__bio_add_page (bio , bp -> l_page , LOGPSIZE , bp -> l_offset );
1978
1978
BUG_ON (bio -> bi_iter .bi_size != LOGPSIZE );
@@ -2115,7 +2115,7 @@ static void lbmStartIO(struct lbuf * bp)
2115
2115
jfs_info ("lbmStartIO" );
2116
2116
2117
2117
if (!log -> no_integrity )
2118
- bdev = log -> bdev_handle -> bdev ;
2118
+ bdev = file_bdev ( log -> bdev_file ) ;
2119
2119
2120
2120
bio = bio_alloc (bdev , 1 , REQ_OP_WRITE | REQ_SYNC ,
2121
2121
GFP_NOFS );
0 commit comments