linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xianting Tian <xianting_tian@126.com>
To: damien.lemoal@wdc.com, naohiro.aota@wdc.com, jth@kernel.org
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Xianting Tian <xianting.tian@linux.alibaba.com>
Subject: [PATCH] zonefs: remove redundant null bio check
Date: Wed, 30 Jun 2021 10:33:36 -0400	[thread overview]
Message-ID: <1625063616-8467-1-git-send-email-xianting_tian@126.com> (raw)

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


                 reply	other threads:[~2021-06-30 14:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1625063616-8467-1-git-send-email-xianting_tian@126.com \
    --to=xianting_tian@126.com \
    --cc=damien.lemoal@wdc.com \
    --cc=jth@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naohiro.aota@wdc.com \
    --cc=xianting.tian@linux.alibaba.com \
    --subject='Re: [PATCH] zonefs: remove redundant null bio check' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox