@@ -1605,7 +1605,7 @@ static void destroy_device_list(struct f2fs_sb_info *sbi)
1605
1605
1606
1606
for (i = 0 ; i < sbi -> s_ndevs ; i ++ ) {
1607
1607
if (i > 0 )
1608
- bdev_release (FDEV (i ).bdev_handle );
1608
+ fput (FDEV (i ).bdev_file );
1609
1609
#ifdef CONFIG_BLK_DEV_ZONED
1610
1610
kvfree (FDEV (i ).blkz_seq );
1611
1611
#endif
@@ -4247,7 +4247,7 @@ static int f2fs_scan_devices(struct f2fs_sb_info *sbi)
4247
4247
4248
4248
for (i = 0 ; i < max_devices ; i ++ ) {
4249
4249
if (i == 0 )
4250
- FDEV (0 ).bdev_handle = sb_bdev_handle ( sbi -> sb ) ;
4250
+ FDEV (0 ).bdev_file = sbi -> sb -> s_bdev_file ;
4251
4251
else if (!RDEV (i ).path [0 ])
4252
4252
break ;
4253
4253
@@ -4267,14 +4267,14 @@ static int f2fs_scan_devices(struct f2fs_sb_info *sbi)
4267
4267
FDEV (i ).end_blk = FDEV (i ).start_blk +
4268
4268
(FDEV (i ).total_segments <<
4269
4269
sbi -> log_blocks_per_seg ) - 1 ;
4270
- FDEV (i ).bdev_handle = bdev_open_by_path (
4270
+ FDEV (i ).bdev_file = bdev_file_open_by_path (
4271
4271
FDEV (i ).path , mode , sbi -> sb , NULL );
4272
4272
}
4273
4273
}
4274
- if (IS_ERR (FDEV (i ).bdev_handle ))
4275
- return PTR_ERR (FDEV (i ).bdev_handle );
4274
+ if (IS_ERR (FDEV (i ).bdev_file ))
4275
+ return PTR_ERR (FDEV (i ).bdev_file );
4276
4276
4277
- FDEV (i ).bdev = FDEV (i ).bdev_handle -> bdev ;
4277
+ FDEV (i ).bdev = file_bdev ( FDEV (i ).bdev_file ) ;
4278
4278
/* to release errored devices */
4279
4279
sbi -> s_ndevs = i + 1 ;
4280
4280
0 commit comments