Message ID | dfc4ac23-88eb-4293-b4dd-e617779ee7ac@stanley.mountain (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | netfs: Remove duplicate check in netfs_cache_read_terminated() | expand |
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; }
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(-)