aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKari Argillander2021-08-25 21:25:22 +0300
committerKonstantin Komarov2021-09-02 18:51:26 +0300
commitdd854e4b5b12016d27bfa2694226a1c15acbd640 (patch)
treef1d139f33bebac81896927f71050f280c5f4a44e
parentd4e8e135a9af7d8d939bba1874ab314322fc2dc2 (diff)
fs/ntfs3: Remove unnecessary condition checking from ntfs_file_read_iter
This check will be also performed in generic_file_read_iter() so we do not want to check this two times in a row. This was founded with Smatch fs/ntfs3/file.c:803 ntfs_file_read_iter() warn: unused return: count = iov_iter_count() Signed-off-by: Kari Argillander <kari.argillander@gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
-rw-r--r--fs/ntfs3/file.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
index f9c9a8c91b46..424450e77ad5 100644
--- a/fs/ntfs3/file.c
+++ b/fs/ntfs3/file.c
@@ -793,8 +793,6 @@ out:
static ssize_t ntfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
{
- ssize_t err;
- size_t count = iov_iter_count(iter);
struct file *file = iocb->ki_filp;
struct inode *inode = file->f_mapping->host;
struct ntfs_inode *ni = ntfs_i(inode);
@@ -823,9 +821,7 @@ static ssize_t ntfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
return -EOPNOTSUPP;
}
- err = count ? generic_file_read_iter(iocb, iter) : 0;
-
- return err;
+ return generic_file_read_iter(iocb, iter);
}
/*