summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);