Re: [PATCH v2] ext4: bio_alloc with __GFP_DIRECT_RECLAIM never fails

From: Chao Yu
Date: Thu Oct 31 2019 - 05:30:16 EST


On 2019/10/31 17:23, Gao Xiang wrote:
> Similar to [1] [2], bio_alloc with __GFP_DIRECT_RECLAIM flags
> guarantees bio allocation under some given restrictions, as
> stated in block/bio.c and fs/direct-io.c So here it's ok to
> not check for NULL value from bio_alloc().
>
> [1] https://lore.kernel.org/r/20191030035518.65477-1-gaoxiang25@xxxxxxxxxx
> [2] https://lore.kernel.org/r/20190830162812.GA10694@xxxxxxxxxxxxx
> Cc: Theodore Ts'o <tytso@xxxxxxx>
> Cc: Andreas Dilger <adilger.kernel@xxxxxxxxx>
> Cc: Ritesh Harjani <riteshh@xxxxxxxxxxxxx>
> Cc: Chao Yu <yuchao0@xxxxxxxxxx>
> Signed-off-by: Gao Xiang <gaoxiang25@xxxxxxxxxx>

Reviewed-by: Chao Yu <yuchao0@xxxxxxxxxx>

Thanks,