* [PATCH v1] f2fs: remove unnecessary null checking
@ 2025-02-02 4:32 Kohei Enju
2025-02-02 14:20 ` [PATCH] " Markus Elfring
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Kohei Enju @ 2025-02-02 4:32 UTC (permalink / raw)
To: linux-f2fs-devel, linux-kernel
Cc: Jaegeuk Kim, Chao Yu, Damien Le Moal, Chaitanya Kulkarni,
Johannes Thumshirn, Jens Axboe, Kohei Enju, Kohei Enju
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>
---
fs/f2fs/data.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index de4da6d9cd93..07b46b444d31 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1041,8 +1041,6 @@ static struct bio *f2fs_grab_read_bio(struct inode *inode, block_t blkaddr,
bio = bio_alloc_bioset(bdev, bio_max_segs(nr_pages),
REQ_OP_READ | op_flag,
for_write ? GFP_NOIO : GFP_KERNEL, &f2fs_bioset);
- if (!bio)
- return ERR_PTR(-ENOMEM);
bio->bi_iter.bi_sector = sector;
f2fs_set_bio_crypt_ctx(bio, inode, first_idx, NULL, GFP_NOFS);
bio->bi_end_io = f2fs_read_end_io;
--
2.39.5 (Apple Git-154)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] f2fs: remove unnecessary null checking
2025-02-02 4:32 [PATCH v1] f2fs: remove unnecessary null checking Kohei Enju
@ 2025-02-02 14:20 ` Markus Elfring
2025-02-02 15:05 ` [PATCH v1] " Jens Axboe
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2025-02-02 14:20 UTC (permalink / raw)
To: Kohei Enju, linux-f2fs-devel, Chao Yu, Jaegeuk Kim
Cc: Kohei Enju, LKML, Chaitanya Kulkarni, Damien Le Moal, Jens Axboe,
Johannes Thumshirn
…
> f2fs_bio_alloc() with bio_alloc_bioset(), but null checking after
> bio_alloc_bioset() was still left.
See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.13#n94
Regards,
Markus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] f2fs: remove unnecessary null checking
2025-02-02 4:32 [PATCH v1] f2fs: remove unnecessary null checking Kohei Enju
2025-02-02 14:20 ` [PATCH] " Markus Elfring
@ 2025-02-02 15:05 ` Jens Axboe
2025-02-06 1:59 ` Chao Yu
2025-02-06 18:40 ` [f2fs-dev] " patchwork-bot+f2fs
3 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2025-02-02 15:05 UTC (permalink / raw)
To: Kohei Enju, linux-f2fs-devel, linux-kernel
Cc: Jaegeuk Kim, Chao Yu, Damien Le Moal, Chaitanya Kulkarni,
Johannes Thumshirn, Kohei Enju
On 2/1/25 9:32 PM, Kohei Enju wrote:
> 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.
Reviewed-by: Jens Axboe <axboe@kernel.dk>
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] f2fs: remove unnecessary null checking
2025-02-02 4:32 [PATCH v1] f2fs: remove unnecessary null checking Kohei Enju
2025-02-02 14:20 ` [PATCH] " Markus Elfring
2025-02-02 15:05 ` [PATCH v1] " Jens Axboe
@ 2025-02-06 1:59 ` Chao Yu
2025-02-06 18:40 ` [f2fs-dev] " patchwork-bot+f2fs
3 siblings, 0 replies; 5+ messages in thread
From: Chao Yu @ 2025-02-06 1:59 UTC (permalink / raw)
To: Kohei Enju, linux-f2fs-devel, linux-kernel
Cc: chao, Jaegeuk Kim, Damien Le Moal, Chaitanya Kulkarni,
Johannes Thumshirn, Jens Axboe, Kohei Enju
On 2/2/25 12:32, Kohei Enju wrote:
> 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: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [f2fs-dev] [PATCH v1] f2fs: remove unnecessary null checking
2025-02-02 4:32 [PATCH v1] f2fs: remove unnecessary null checking Kohei Enju
` (2 preceding siblings ...)
2025-02-06 1:59 ` Chao Yu
@ 2025-02-06 18:40 ` patchwork-bot+f2fs
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+f2fs @ 2025-02-06 18:40 UTC (permalink / raw)
To: Kohei Enju
Cc: linux-f2fs-devel, linux-kernel, axboe, damien.lemoal,
chaitanya.kulkarni, johannes.thumshirn, jaegeuk, kohei.enju
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Sun, 2 Feb 2025 13:32:53 +0900 you wrote:
> 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>
>
> [...]
Here is the summary with links:
- [f2fs-dev,v1] f2fs: remove unnecessary null checking
https://git.kernel.org/jaegeuk/f2fs/c/53333cdf5b03
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-06 18:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-02 4:32 [PATCH v1] f2fs: remove unnecessary null checking Kohei Enju
2025-02-02 14:20 ` [PATCH] " Markus Elfring
2025-02-02 15:05 ` [PATCH v1] " Jens Axboe
2025-02-06 1:59 ` Chao Yu
2025-02-06 18:40 ` [f2fs-dev] " patchwork-bot+f2fs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox