summaryrefslogtreecommitdiff
path: root/nfs
diff options
context:
space:
mode:
authorMichael Kelly <mike@weatherwax.co.uk>2025-07-10 18:36:39 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-07-10 18:37:05 +0200
commit09860e8f80d095e94bc15d9b67e708cc77fab16f (patch)
treeaede2396e5eae029d84d8ee6f085a739eb1d8ca6 /nfs
parentcdedbc4b018212f60e7e64b9696d6a7641281452 (diff)
nfs: Fix write encoding for v3HEADmaster
Diffstat (limited to 'nfs')
-rw-r--r--nfs/ops.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/nfs/ops.c b/nfs/ops.c
index a34d905a..6e5bfeb1 100644
--- a/nfs/ops.c
+++ b/nfs/ops.c
@@ -537,12 +537,17 @@ netfs_attempt_write (struct iouser *cred, struct node *np,
p = xdr_encode_fhandle (p, &np->nn->handle);
if (protocol_version == 2)
+ {
*(p++) = 0;
- *(p++) = htonl (offset);
- if (protocol_version == 2)
+ *(p++) = htonl (offset);
*(p++) = 0;
- if (protocol_version == 3)
+ }
+ else
+ {
+ p = xdr_encode_64bit(p, offset);
+ *(p++) = htonl (thisamt);
*(p++) = htonl (FILE_SYNC);
+ }
p = xdr_encode_data (p, data, thisamt);
err = conduct_rpc (&rpcbuf, &p);