@@ -1479,12 +1479,12 @@ static void setup_split_accounting(struct clone_info *ci, unsigned int len)
1479
1479
1480
1480
static void alloc_multiple_bios (struct bio_list * blist , struct clone_info * ci ,
1481
1481
struct dm_target * ti , unsigned int num_bios ,
1482
- unsigned * len , gfp_t gfp_flag )
1482
+ unsigned * len )
1483
1483
{
1484
1484
struct bio * bio ;
1485
- int try = ( gfp_flag & GFP_NOWAIT ) ? 0 : 1 ;
1485
+ int try ;
1486
1486
1487
- for (; try < 2 ; try ++ ) {
1487
+ for (try = 0 ; try < 2 ; try ++ ) {
1488
1488
int bio_nr ;
1489
1489
1490
1490
if (try && num_bios > 1 )
@@ -1508,8 +1508,7 @@ static void alloc_multiple_bios(struct bio_list *blist, struct clone_info *ci,
1508
1508
}
1509
1509
1510
1510
static unsigned int __send_duplicate_bios (struct clone_info * ci , struct dm_target * ti ,
1511
- unsigned int num_bios , unsigned int * len ,
1512
- gfp_t gfp_flag )
1511
+ unsigned int num_bios , unsigned int * len )
1513
1512
{
1514
1513
struct bio_list blist = BIO_EMPTY_LIST ;
1515
1514
struct bio * clone ;
@@ -1526,7 +1525,7 @@ static unsigned int __send_duplicate_bios(struct clone_info *ci, struct dm_targe
1526
1525
* Using alloc_multiple_bios(), even if num_bios is 1, to consistently
1527
1526
* support allocating using GFP_NOWAIT with GFP_NOIO fallback.
1528
1527
*/
1529
- alloc_multiple_bios (& blist , ci , ti , num_bios , len , gfp_flag );
1528
+ alloc_multiple_bios (& blist , ci , ti , num_bios , len );
1530
1529
while ((clone = bio_list_pop (& blist ))) {
1531
1530
if (num_bios > 1 )
1532
1531
dm_tio_set_flag (clone_to_tio (clone ), DM_TIO_IS_DUPLICATE_BIO );
@@ -1564,7 +1563,7 @@ static void __send_empty_flush(struct clone_info *ci)
1564
1563
1565
1564
atomic_add (ti -> num_flush_bios , & ci -> io -> io_count );
1566
1565
bios = __send_duplicate_bios (ci , ti , ti -> num_flush_bios ,
1567
- NULL , GFP_NOWAIT );
1566
+ NULL );
1568
1567
atomic_sub (ti -> num_flush_bios - bios , & ci -> io -> io_count );
1569
1568
}
1570
1569
} else {
@@ -1612,7 +1611,7 @@ static void __send_abnormal_io(struct clone_info *ci, struct dm_target *ti,
1612
1611
__max_io_len (ti , ci -> sector , max_granularity , max_sectors ));
1613
1612
1614
1613
atomic_add (num_bios , & ci -> io -> io_count );
1615
- bios = __send_duplicate_bios (ci , ti , num_bios , & len , GFP_NOIO );
1614
+ bios = __send_duplicate_bios (ci , ti , num_bios , & len );
1616
1615
/*
1617
1616
* alloc_io() takes one extra reference for submission, so the
1618
1617
* reference won't reach 0 without the following (+1) subtraction
@@ -1849,7 +1848,7 @@ static blk_status_t __send_zone_reset_all_emulated(struct clone_info *ci,
1849
1848
* not go crazy with the clone allocation.
1850
1849
*/
1851
1850
alloc_multiple_bios (& blist , ci , ti , min (nr_reset , 32 ),
1852
- NULL , GFP_NOIO );
1851
+ NULL );
1853
1852
}
1854
1853
1855
1854
/* Get a clone and change it to a regular reset operation. */
@@ -1881,7 +1880,7 @@ static void __send_zone_reset_all_native(struct clone_info *ci,
1881
1880
unsigned int bios ;
1882
1881
1883
1882
atomic_add (1 , & ci -> io -> io_count );
1884
- bios = __send_duplicate_bios (ci , ti , 1 , NULL , GFP_NOIO );
1883
+ bios = __send_duplicate_bios (ci , ti , 1 , NULL );
1885
1884
atomic_sub (1 - bios , & ci -> io -> io_count );
1886
1885
1887
1886
ci -> sector_count = 0 ;
0 commit comments