File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1722,10 +1722,8 @@ static CLOSURE_CALLBACK(journal_write_submit)
17221722 unsigned sectors = vstruct_sectors (w -> data , c -> block_bits );
17231723
17241724 extent_for_each_ptr (bkey_i_to_s_extent (& w -> key ), ptr ) {
1725- struct bch_dev * ca = bch2_dev_bkey_exists (c , ptr -> dev );
1726- struct journal_device * ja = & ca -> journal ;
1727-
1728- if (!percpu_ref_tryget (& ca -> io_ref )) {
1725+ struct bch_dev * ca = bch2_dev_get_ioref2 (c , ptr -> dev , WRITE );
1726+ if (!ca ) {
17291727 /* XXX: fix this */
17301728 bch_err (c , "missing device for journal write\n" );
17311729 continue ;
@@ -1734,6 +1732,7 @@ static CLOSURE_CALLBACK(journal_write_submit)
17341732 this_cpu_add (ca -> io_done -> sectors [WRITE ][BCH_DATA_journal ],
17351733 sectors );
17361734
1735+ struct journal_device * ja = & ca -> journal ;
17371736 struct bio * bio = & ja -> bio [w -> idx ]-> bio ;
17381737 bio_reset (bio , ca -> disk_sb .bdev , REQ_OP_WRITE |REQ_SYNC |REQ_META );
17391738 bio -> bi_iter .bi_sector = ptr -> offset ;
You can’t perform that action at this time.
0 commit comments