linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shi Siyuan <shisiyuan19870131@gmail.com>
To: tytso@mit.edu, adilger.kernel@dilger.ca
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	shisiyuan <shisiyuan@xiaomi.com>
Subject: [PATCH] ext4: remove unnecessary error check
Date: Wed,  3 Jul 2019 16:16:54 +0800	[thread overview]
Message-ID: <f4c9a68280d23b43f8949265d33244012e2b40e4.1562138716.git.shisiyuan@xiaomi.com> (raw)
In-Reply-To: <cover.1562138716.git.shisiyuan@xiaomi.com>

From: shisiyuan <shisiyuan@xiaomi.com>

Remove unnecessary error check in ext4_file_write_iter(),
because this check will be done in upcoming later function --
ext4_write_checks() -> generic_write_checks()

Change-Id: I7b0ab27f693a50765c15b5eaa3f4e7c38f42e01e
Signed-off-by: shisiyuan <shisiyuan@xiaomi.com>
---
 fs/ext4/file.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 5cb9aa3..9e4c39e 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -224,8 +224,6 @@ ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
 	if (IS_DAX(inode))
 		return ext4_dax_write_iter(iocb, from);
 #endif
-	if (!o_direct && (iocb->ki_flags & IOCB_NOWAIT))
-		return -EOPNOTSUPP;
 
 	if (!inode_trylock(inode)) {
 		if (iocb->ki_flags & IOCB_NOWAIT)
-- 
2.7.4


       reply	other threads:[~2019-07-03  8:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1562138716.git.shisiyuan@xiaomi.com>
2019-07-03  8:16 ` Shi Siyuan [this message]
2019-07-18 15:17   ` [PATCH] ext4: remove unnecessary error check Theodore Y. Ts'o

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=f4c9a68280d23b43f8949265d33244012e2b40e4.1562138716.git.shisiyuan@xiaomi.com \
    --to=shisiyuan19870131@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shisiyuan@xiaomi.com \
    --cc=tytso@mit.edu \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).