File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -595,17 +595,20 @@ int f2fs_init_write_merge_io(struct f2fs_sb_info *sbi)
595595 return - ENOMEM ;
596596
597597 for (j = HOT ; j < n ; j ++ ) {
598- init_f2fs_rwsem (& sbi -> write_io [i ][j ].io_rwsem );
599- sbi -> write_io [i ][j ].sbi = sbi ;
600- sbi -> write_io [i ][j ].bio = NULL ;
601- spin_lock_init (& sbi -> write_io [i ][j ].io_lock );
602- INIT_LIST_HEAD (& sbi -> write_io [i ][j ].io_list );
603- INIT_LIST_HEAD (& sbi -> write_io [i ][j ].bio_list );
604- init_f2fs_rwsem (& sbi -> write_io [i ][j ].bio_list_lock );
598+ struct f2fs_bio_info * io = & sbi -> write_io [i ][j ];
599+
600+ init_f2fs_rwsem (& io -> io_rwsem );
601+ io -> sbi = sbi ;
602+ io -> bio = NULL ;
603+ io -> last_block_in_bio = 0 ;
604+ spin_lock_init (& io -> io_lock );
605+ INIT_LIST_HEAD (& io -> io_list );
606+ INIT_LIST_HEAD (& io -> bio_list );
607+ init_f2fs_rwsem (& io -> bio_list_lock );
605608#ifdef CONFIG_BLK_DEV_ZONED
606- init_completion (& sbi -> write_io [ i ][ j ]. zone_wait );
607- sbi -> write_io [ i ][ j ]. zone_pending_bio = NULL ;
608- sbi -> write_io [ i ][ j ]. bi_private = NULL ;
609+ init_completion (& io -> zone_wait );
610+ io -> zone_pending_bio = NULL ;
611+ io -> bi_private = NULL ;
609612#endif
610613 }
611614 }
You can’t perform that action at this time.
0 commit comments