diff options
| author | David Howells <[email protected]> | 2024-12-16 20:40:58 +0000 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2024-12-20 21:34:03 +0000 |
| commit | 360157829ee3dba848ffa817792d9a07969e0a95 (patch) | |
| tree | 50ec8de002e0066f18f10029498779ac3482269a /fs/netfs/buffered_read.c | |
| parent | netfs: Split retry code out of fs/netfs/write_collect.c (diff) | |
| download | kernel-360157829ee3dba848ffa817792d9a07969e0a95.tar.gz kernel-360157829ee3dba848ffa817792d9a07969e0a95.zip | |
netfs: Drop the error arg from netfs_read_subreq_terminated()
Drop the error argument from netfs_read_subreq_terminated() in favour of
passing the value in subreq->error.
Signed-off-by: David Howells <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
cc: Jeff Layton <[email protected]>
cc: [email protected]
cc: [email protected]
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'fs/netfs/buffered_read.c')
| -rw-r--r-- | fs/netfs/buffered_read.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/netfs/buffered_read.c b/fs/netfs/buffered_read.c index db874fea8794..d420d623711c 100644 --- a/fs/netfs/buffered_read.c +++ b/fs/netfs/buffered_read.c @@ -148,14 +148,13 @@ static void netfs_cache_read_terminated(void *priv, ssize_t transferred_or_error { struct netfs_io_subrequest *subreq = priv; - if (transferred_or_error < 0) { - netfs_read_subreq_terminated(subreq, transferred_or_error, was_async); - return; - } - - if (transferred_or_error > 0) + if (transferred_or_error > 0) { subreq->transferred += transferred_or_error; - netfs_read_subreq_terminated(subreq, 0, was_async); + subreq->error = 0; + } else { + subreq->error = transferred_or_error; + } + netfs_read_subreq_terminated(subreq, was_async); } /* @@ -255,7 +254,8 @@ static void netfs_read_to_pagecache(struct netfs_io_request *rreq) if (slice < 0) goto prep_iter_failed; __set_bit(NETFS_SREQ_CLEAR_TAIL, &subreq->flags); - netfs_read_subreq_terminated(subreq, 0, false); + subreq->error = 0; + netfs_read_subreq_terminated(subreq, false); goto done; } |
