Skip to contentSkip to conversation

netfs: Fix unbuffered writes

PATCH In review David Howells 1 participant 2 messages Feb 26, 2025

Subsystems (5)
lore
Share & tools
lore

David Howells

author maintainer
#0 lore raw

PATCH 1/1 netfs: Fix unbuffered writes

Fix netfs_wait_for_request() so that it doesn't check the outcome of a synchronous unbuffered write and emit error -EIO and a netfs_failure trace line if the write appears to be short. This will affect both 9p and cifs, depending on the mount options; it does not affect DIO writes.

This check is a problem because the write side doesn't set rreq->submitted, but rather ->issued_to (the two ought to be merged as one is superfluous). This now occurs because the code was generalised from just the read side to the write side as well.

Fixes 9dc06eff2097 ("netfs: Fix wait/wake to be consistent about the waitqueue used")
cc Steve French <[email protected]>
cc Ihor Solodrai <[email protected]>
cc Eric Van Hensbergen <[email protected]>
cc Latchesar Ionkov <[email protected]>
cc Dominique Martinet <[email protected]>
cc Christian Schoenebeck <[email protected]>
cc Paulo Alcantara <[email protected]>
cc Jeff Layton <[email protected]>
---
 fs/netfs/misc.c |    1 +
 1 file changed, 1 insertion(+)
fs/netfs/misc.c +1 -0
index 6a5a7704e983..77e7f7c79d27 100644
@@ -461,6 +461,7 @@ static ssize_t netfs_wait_for_request(struct netfs_io_request *rreq,
 		case NETFS_DIO_READ:
 		case NETFS_DIO_WRITE:
 		case NETFS_READ_SINGLE:
+		case NETFS_UNBUFFERED_WRITE:
 			break;
 		default:
 			if (rreq->submitted < rreq->len) {
author maintainer
#1 lore raw
Quoted 1 line · David Howells
Fixes 9dc06eff2097 ("netfs: Fix wait/wake to be consistent about the waitqueue used")

Actually, you can ignore this. It's for a patch that's not upstream and can be folded in.

David