mirror of
https://github.com/torvalds/linux.git
synced 2026-09-11 20:13:02 +02:00
netfs: Fix error vs transferred passed to ->ki_complete()
Fix netfs_unbuffered_write_done() to pass the amount written to
->ki_complete() rather than the error in the event of a partially complete
transfer.
Fixes: a0b4c7a491 ("netfs: Fix unbuffered/DIO writes to dispatch subrequests in strict sequence")
Link: https://sashiko.dev/#/patchset/20260824120224.504575-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://patch.msgid.link/20260827134304.2075713-4-dhowells@redhat.com
Acked-by: Paulo Alcantara <pc@manguebit.org>
cc: Paulo Alcantara <pc@manguebit.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
c753a33664
commit
0bfe2571a6
|
|
@ -51,7 +51,7 @@ static void netfs_unbuffered_write_done(struct netfs_io_request *wreq)
|
|||
wreq->iocb->ki_pos += written;
|
||||
if (wreq->iocb->ki_complete) {
|
||||
trace_netfs_rreq(wreq, netfs_rreq_trace_ki_complete);
|
||||
wreq->iocb->ki_complete(wreq->iocb, wreq->error ?: written);
|
||||
wreq->iocb->ki_complete(wreq->iocb, written ?: wreq->error);
|
||||
}
|
||||
wreq->iocb = VFS_PTR_POISON;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user