Skip to content

Commit 07c574e

Browse files
dhowellsbrauner
authored andcommitted
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 <dhowells@redhat.com> Link: https://lore.kernel.org/r/20250314164201.1993231-5-dhowells@redhat.com Acked-by: "Paulo Alcantara (Red Hat)" <pc@manguebit.com> cc: Jeff Layton <jlayton@kernel.org> cc: Viacheslav Dubeyko <slava@dubeyko.com> cc: Alex Markuze <amarkuze@redhat.com> cc: Ilya Dryomov <idryomov@gmail.com> cc: ceph-devel@vger.kernel.org cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 15e9aaf commit 07c574e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/netfs/direct_read.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ static int netfs_dispatch_unbuffered_reads(struct netfs_io_request *rreq)
125125
* Perform a read to an application buffer, bypassing the pagecache and the
126126
* local disk cache.
127127
*/
128-
static int netfs_unbuffered_read(struct netfs_io_request *rreq, bool sync)
128+
static ssize_t netfs_unbuffered_read(struct netfs_io_request *rreq, bool sync)
129129
{
130-
int ret;
130+
ssize_t ret;
131131

132132
_enter("R=%x %llx-%llx",
133133
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)
155155
else
156156
ret = -EIOCBQUEUED;
157157
out:
158-
_leave(" = %d", ret);
158+
_leave(" = %zd", ret);
159159
return ret;
160160
}
161161

0 commit comments

Comments
 (0)