aboutsummaryrefslogtreecommitdiffstats
path: root/fs/netfs/direct_read.c
diff options
context:
space:
mode:
authorDavid Howells <[email protected]>2025-03-14 16:41:59 +0000
committerChristian Brauner <[email protected]>2025-03-19 09:04:23 +0000
commit07c574eb53d4cc9aa7b985bc8bfcb302e5dc4694 (patch)
tree5109724f0b9226e4ed063d4f8c5ebb1023cadd95 /fs/netfs/direct_read.c
parentnetfs: Fix rolling_buffer_load_from_ra() to not clear mark bits (diff)
downloadkernel-07c574eb53d4cc9aa7b985bc8bfcb302e5dc4694.tar.gz
kernel-07c574eb53d4cc9aa7b985bc8bfcb302e5dc4694.zip
netfs: Fix netfs_unbuffered_read() to return ssize_t rather than int
Fix netfs_unbuffered_read() to return an ssize_t rather than an int as netfs_wait_for_read() returns ssize_t and this gets implicitly truncated. Signed-off-by: David Howells <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: "Paulo Alcantara (Red Hat)" <[email protected]> cc: Jeff Layton <[email protected]> cc: Viacheslav Dubeyko <[email protected]> cc: Alex Markuze <[email protected]> cc: Ilya Dryomov <[email protected]> cc: [email protected] cc: [email protected] Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'fs/netfs/direct_read.c')
-rw-r--r--fs/netfs/direct_read.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/netfs/direct_read.c b/fs/netfs/direct_read.c
index 0bf3c2f5a710..5e3f0aeb51f3 100644
--- a/fs/netfs/direct_read.c
+++ b/fs/netfs/direct_read.c
@@ -125,9 +125,9 @@ static int netfs_dispatch_unbuffered_reads(struct netfs_io_request *rreq)
* Perform a read to an application buffer, bypassing the pagecache and the
* local disk cache.
*/
-static int netfs_unbuffered_read(struct netfs_io_request *rreq, bool sync)
+static ssize_t netfs_unbuffered_read(struct netfs_io_request *rreq, bool sync)
{
- int ret;
+ ssize_t ret;
_enter("R=%x %llx-%llx",
rreq->debug_id, rreq->start, rreq->start + rreq->len - 1);
@@ -155,7 +155,7 @@ static int netfs_unbuffered_read(struct netfs_io_request *rreq, bool sync)
else
ret = -EIOCBQUEUED;
out:
- _leave(" = %d", ret);
+ _leave(" = %zd", ret);
return ret;
}