File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -2300,24 +2300,22 @@ static int rmw_rbio(struct btrfs_raid_bio *rbio)
2300
2300
* Either full stripe write, or we have every data sector already
2301
2301
* cached, can go to write path immediately.
2302
2302
*/
2303
- if (rbio_is_full (rbio ) || !need_read_stripe_sectors (rbio ))
2304
- goto write ;
2305
-
2306
- /*
2307
- * Now we're doing sub-stripe write, also need all data stripes to do
2308
- * the full RMW.
2309
- */
2310
- ret = alloc_rbio_data_pages (rbio );
2311
- if (ret < 0 )
2312
- return ret ;
2303
+ if (!rbio_is_full (rbio ) && need_read_stripe_sectors (rbio )) {
2304
+ /*
2305
+ * Now we're doing sub-stripe write, also need all data stripes
2306
+ * to do the full RMW.
2307
+ */
2308
+ ret = alloc_rbio_data_pages (rbio );
2309
+ if (ret < 0 )
2310
+ return ret ;
2313
2311
2314
- index_rbio_pages (rbio );
2312
+ index_rbio_pages (rbio );
2315
2313
2316
- ret = rmw_read_wait_recover (rbio );
2317
- if (ret < 0 )
2318
- return ret ;
2314
+ ret = rmw_read_wait_recover (rbio );
2315
+ if (ret < 0 )
2316
+ return ret ;
2317
+ }
2319
2318
2320
- write :
2321
2319
/*
2322
2320
* At this stage we're not allowed to add any new bios to the
2323
2321
* bio list any more, anyone else that wants to change this stripe
You can’t perform that action at this time.
0 commit comments