Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

f2fs: remove unnecessary null checking

When __GFP_DIRECT_RECLAIM (included in both GFP_NOIO and GFP_KERNEL) is
specified, bio_alloc_bioset() never fails to allocate a bio.
Commit 67883ade7a98 ("f2fs: remove FAULT_ALLOC_BIO") replaced
f2fs_bio_alloc() with bio_alloc_bioset(), but null checking after
bio_alloc_bioset() was still left.

Fixes: 67883ade7a98 ("f2fs: remove FAULT_ALLOC_BIO")
Signed-off-by: Kohei Enju <enjuk@amazon.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

authored by

Kohei Enju and committed by
Jaegeuk Kim
53333cdf 21925ede

-2
-2
fs/f2fs/data.c
··· 1041 1041 bio = bio_alloc_bioset(bdev, bio_max_segs(nr_pages), 1042 1042 REQ_OP_READ | op_flag, 1043 1043 for_write ? GFP_NOIO : GFP_KERNEL, &f2fs_bioset); 1044 - if (!bio) 1045 - return ERR_PTR(-ENOMEM); 1046 1044 bio->bi_iter.bi_sector = sector; 1047 1045 f2fs_set_bio_crypt_ctx(bio, inode, first_idx, NULL, GFP_NOFS); 1048 1046 bio->bi_end_io = f2fs_read_end_io;