|
Kmods SIG |
63c143 |
From dd854e4b5b12016d27bfa2694226a1c15acbd640 Mon Sep 17 00:00:00 2001
|
|
Kmods SIG |
63c143 |
From: Kari Argillander <kari.argillander@gmail.com>
|
|
Kmods SIG |
63c143 |
Date: Wed, 25 Aug 2021 21:25:22 +0300
|
|
Kmods SIG |
63c143 |
Subject: [Backport dd854e4b5b12] src: Remove unnecessary condition
|
|
Kmods SIG |
63c143 |
checking from ntfs_file_read_iter
|
|
Kmods SIG |
63c143 |
|
|
Kmods SIG |
63c143 |
This check will be also performed in generic_file_read_iter() so we do
|
|
Kmods SIG |
63c143 |
not want to check this two times in a row.
|
|
Kmods SIG |
63c143 |
|
|
Kmods SIG |
63c143 |
This was founded with Smatch
|
|
Kmods SIG |
63c143 |
src/file.c:803 ntfs_file_read_iter()
|
|
Kmods SIG |
63c143 |
warn: unused return: count = iov_iter_count()
|
|
Kmods SIG |
63c143 |
|
|
Kmods SIG |
63c143 |
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
|
|
Kmods SIG |
63c143 |
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
|
|
Kmods SIG |
63c143 |
---
|
|
Kmods SIG |
63c143 |
src/file.c | 6 +-----
|
|
Kmods SIG |
63c143 |
1 file changed, 1 insertion(+), 5 deletions(-)
|
|
Kmods SIG |
63c143 |
|
|
Kmods SIG |
63c143 |
diff --git a/src/file.c b/src/file.c
|
|
Kmods SIG |
63c143 |
index f9c9a8c91b46d6fad597c954c3b4a2cd331ebfb6..424450e77ad52ae550e8de444dc393411d97cde6 100644
|
|
Kmods SIG |
63c143 |
--- a/src/file.c
|
|
Kmods SIG |
63c143 |
+++ b/src/file.c
|
|
Kmods SIG |
63c143 |
@@ -793,8 +793,6 @@ int ntfs3_setattr(struct user_namespace *mnt_userns, struct dentry *dentry,
|
|
Kmods SIG |
63c143 |
|
|
Kmods SIG |
63c143 |
static ssize_t ntfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
|
|
Kmods SIG |
63c143 |
{
|
|
Kmods SIG |
63c143 |
- ssize_t err;
|
|
Kmods SIG |
63c143 |
- size_t count = iov_iter_count(iter);
|
|
Kmods SIG |
63c143 |
struct file *file = iocb->ki_filp;
|
|
Kmods SIG |
63c143 |
struct inode *inode = file->f_mapping->host;
|
|
Kmods SIG |
63c143 |
struct ntfs_inode *ni = ntfs_i(inode);
|
|
Kmods SIG |
63c143 |
@@ -823,9 +821,7 @@ static ssize_t ntfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
|
|
Kmods SIG |
63c143 |
return -EOPNOTSUPP;
|
|
Kmods SIG |
63c143 |
}
|
|
Kmods SIG |
63c143 |
|
|
Kmods SIG |
63c143 |
- err = count ? generic_file_read_iter(iocb, iter) : 0;
|
|
Kmods SIG |
63c143 |
-
|
|
Kmods SIG |
63c143 |
- return err;
|
|
Kmods SIG |
63c143 |
+ return generic_file_read_iter(iocb, iter);
|
|
Kmods SIG |
63c143 |
}
|
|
Kmods SIG |
63c143 |
|
|
Kmods SIG |
63c143 |
/*
|
|
Kmods SIG |
63c143 |
--
|
|
Kmods SIG |
63c143 |
2.31.1
|
|
Kmods SIG |
63c143 |
|