linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] zonefs: remove redundant null bio check
@ 2021-06-30 14:33 Xianting Tian
  0 siblings, 0 replies; only message in thread
From: Xianting Tian @ 2021-06-30 14:33 UTC (permalink / raw)
  To: damien.lemoal, naohiro.aota, jth
  Cc: linux-fsdevel, linux-kernel, Xianting Tian

From: Xianting Tian <xianting.tian@linux.alibaba.com>

bio_alloc() with __GFP_DIRECT_RECLAIM, which is included in
GFP_NOFS, never fails, see comments in bio_alloc_bioset().

Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
---
 fs/zonefs/super.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index cd145d3..d6d08da 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -705,9 +705,6 @@ static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter *from)
 		return 0;
 
 	bio = bio_alloc(GFP_NOFS, nr_pages);
-	if (!bio)
-		return -ENOMEM;
-
 	bio_set_dev(bio, bdev);
 	bio->bi_iter.bi_sector = zi->i_zsector;
 	bio->bi_write_hint = iocb->ki_hint;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-30 14:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 14:33 [PATCH] zonefs: remove redundant null bio check Xianting Tian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).