[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1625063616-8467-1-git-send-email-xianting_tian@126.com>
Date: Wed, 30 Jun 2021 10:33:36 -0400
From: Xianting Tian <xianting_tian@....com>
To: damien.lemoal@....com, naohiro.aota@....com, jth@...nel.org
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Xianting Tian <xianting.tian@...ux.alibaba.com>
Subject: [PATCH] zonefs: remove redundant null bio check
From: Xianting Tian <xianting.tian@...ux.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@...ux.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
Powered by blists - more mailing lists