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