Re: [PATCH] mm: bio_alloc never fails when set GFP_NOIO, GFP_KERNEL

2020-10-25 Thread Jens Axboe
On 10/25/20 1:09 PM, Andrew Morton wrote: > On Wed, 21 Oct 2020 11:11:28 +0800 Xianting Tian > wrote: > >> bio_alloc with __GFP_DIRECT_RECLAIM(which is included in GFP_NOIO, >> GFP_KERNEL) never fails, as stated in the comments of bio_alloc_bioset. >> >> So we can remove multiple unneeded null

Re: [PATCH] mm: bio_alloc never fails when set GFP_NOIO, GFP_KERNEL

2020-10-25 Thread Andrew Morton
On Wed, 21 Oct 2020 11:11:28 +0800 Xianting Tian wrote: > bio_alloc with __GFP_DIRECT_RECLAIM(which is included in GFP_NOIO, > GFP_KERNEL) never fails, as stated in the comments of bio_alloc_bioset. > > So we can remove multiple unneeded null checks of bio_alloc and simplify > the code. > > We

RE: [PATCH] mm: bio_alloc never fails when set GFP_NOIO, GFP_KERNEL

2020-10-23 Thread Tianxianting
: bio_alloc never fails when set GFP_NOIO, GFP_KERNEL bio_alloc with __GFP_DIRECT_RECLAIM(which is included in GFP_NOIO, GFP_KERNEL) never fails, as stated in the comments of bio_alloc_bioset. So we can remove multiple unneeded null checks of bio_alloc and simplify the code. We have done it in fs/ext4

[PATCH] mm: bio_alloc never fails when set GFP_NOIO, GFP_KERNEL

2020-10-20 Thread Xianting Tian
bio_alloc with __GFP_DIRECT_RECLAIM(which is included in GFP_NOIO, GFP_KERNEL) never fails, as stated in the comments of bio_alloc_bioset. So we can remove multiple unneeded null checks of bio_alloc and simplify the code. We have done it in fs/ext4/readpage.c, fs/ext4/page-io.c, fs/direct-io.c,