File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1722,10 +1722,8 @@ static CLOSURE_CALLBACK(journal_write_submit)
1722
1722
unsigned sectors = vstruct_sectors (w -> data , c -> block_bits );
1723
1723
1724
1724
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 ) {
1729
1727
/* XXX: fix this */
1730
1728
bch_err (c , "missing device for journal write\n" );
1731
1729
continue ;
@@ -1734,6 +1732,7 @@ static CLOSURE_CALLBACK(journal_write_submit)
1734
1732
this_cpu_add (ca -> io_done -> sectors [WRITE ][BCH_DATA_journal ],
1735
1733
sectors );
1736
1734
1735
+ struct journal_device * ja = & ca -> journal ;
1737
1736
struct bio * bio = & ja -> bio [w -> idx ]-> bio ;
1738
1737
bio_reset (bio , ca -> disk_sb .bdev , REQ_OP_WRITE |REQ_SYNC |REQ_META );
1739
1738
bio -> bi_iter .bi_sector = ptr -> offset ;
You can’t perform that action at this time.
0 commit comments