From: Dan Carpenter <dan.carpenter@linaro.org>
To: David Howells <dhowells@redhat.com>
Cc: Jeff Layton <jlayton@kernel.org>,
netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] netfs: Remove duplicate check in netfs_cache_read_terminated()
Date: Fri, 15 Nov 2024 12:13:46 +0300 [thread overview]
Message-ID: <dfc4ac23-88eb-4293-b4dd-e617779ee7ac@stanley.mountain> (raw)
There are two checks for "if (transferred_or_error > 0)". Delete
the second check.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
fs/netfs/read_collect.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/netfs/read_collect.c b/fs/netfs/read_collect.c
index 7f3a3c056c6e..431166d4f103 100644
--- a/fs/netfs/read_collect.c
+++ b/fs/netfs/read_collect.c
@@ -597,10 +597,8 @@ void netfs_cache_read_terminated(void *priv, ssize_t transferred_or_error, bool
if (transferred_or_error > 0) {
subreq->error = 0;
- if (transferred_or_error > 0) {
- subreq->transferred += transferred_or_error;
- __set_bit(NETFS_SREQ_MADE_PROGRESS, &subreq->flags);
- }
+ subreq->transferred += transferred_or_error;
+ __set_bit(NETFS_SREQ_MADE_PROGRESS, &subreq->flags);
} else {
subreq->error = transferred_or_error;
}
--
2.45.2
reply other threads:[~2024-11-15 9:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dfc4ac23-88eb-4293-b4dd-e617779ee7ac@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=dhowells@redhat.com \
--cc=jlayton@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netfs@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox