add patch fix-potential-use-after-free-after-remounting-with-noblock_validity
[ext4-patch-queue.git] / remove-unnecessary-error-check
bloba8c8523f8ef2b0bec5f5d35d63b3a0963815d528
1 ext4: remove unnecessary error check
3 From: Shi Siyuan <shisiyuan@xiaomi.com>
5 Remove unnecessary error check in ext4_file_write_iter(),
6 because this check will be done in upcoming later function --
7 ext4_write_checks() -> generic_write_checks()
9 Change-Id: I7b0ab27f693a50765c15b5eaa3f4e7c38f42e01e
10 Signed-off-by: shisiyuan <shisiyuan@xiaomi.com>
11 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
12 ---
13  fs/ext4/file.c | 2 --
14  1 file changed, 2 deletions(-)
16 diff --git a/fs/ext4/file.c b/fs/ext4/file.c
17 index 5cb9aa3..9e4c39e 100644
18 --- a/fs/ext4/file.c
19 +++ b/fs/ext4/file.c
20 @@ -224,8 +224,6 @@ ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
21         if (IS_DAX(inode))
22                 return ext4_dax_write_iter(iocb, from);
23  #endif
24 -       if (!o_direct && (iocb->ki_flags & IOCB_NOWAIT))
25 -               return -EOPNOTSUPP;
27         if (!inode_trylock(inode)) {
28                 if (iocb->ki_flags & IOCB_NOWAIT)
29 -- 
30 2.7.4