ext4: remove unnecessary error check
diff mbox series

Message ID f4c9a68280d23b43f8949265d33244012e2b40e4.1562138716.git.shisiyuan@xiaomi.com
State Awaiting Upstream
Headers show
Series
  • ext4: remove unnecessary error check
Related show

Commit Message

Shi Siyuan July 3, 2019, 8:16 a.m. UTC
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(-)

Comments

Theodore Y. Ts'o July 18, 2019, 3:17 p.m. UTC | #1
On Wed, Jul 03, 2019 at 04:16:54PM +0800, Shi Siyuan wrote:
> 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>

Thanks, applied.

					- Ted

Patch
diff mbox series

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)