diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/nfs/server/src/nfs3.c | 11 | ||||
-rw-r--r-- | xlators/protocol/server/src/server3_1-fops.c | 5 |
2 files changed, 9 insertions, 7 deletions
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c index f950b9273ee..684123958b8 100644 --- a/xlators/nfs/server/src/nfs3.c +++ b/xlators/nfs/server/src/nfs3.c @@ -2238,17 +2238,18 @@ out: int -nfs3svc_write_vecsizer (int state, ssize_t *readsize, char *addr) +nfs3svc_write_vecsizer (int state, ssize_t *readsize, char *base_addr, + char *curr_addr) { - int ret = 0; - uint32_t fhlen = 0; - uint32_t fhlen_n = 0; + int ret = 0; + uint32_t fhlen = 0; + uint32_t fhlen_n = 0; if (state == 0) { ret = NFS3_VECWRITE_READFHLEN; *readsize = 4; } else if (state == NFS3_VECWRITE_READFHLEN) { - fhlen_n = *(uint32_t *)(addr - 4); + fhlen_n = *(uint32_t *)(curr_addr - 4); fhlen = ntohl (fhlen_n); *readsize = xdr_length_round_up (fhlen, NFS3_FHSIZE); ret = NFS3_VECWRITE_READFH; diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c index 06283461d06..166f720941a 100644 --- a/xlators/protocol/server/src/server3_1-fops.c +++ b/xlators/protocol/server/src/server3_1-fops.c @@ -3431,7 +3431,8 @@ server_writev_vec (rpcsvc_request_t *req, struct iovec *payload, #define SERVER3_1_VECWRITE_READING_OPAQUE 2 int -server_writev_vecsizer (int state, ssize_t *readsize, char *addr) +server_writev_vecsizer (int state, ssize_t *readsize, char *base_addr, + char *curr_addr) { ssize_t size = 0; int nextstate = 0; @@ -3449,7 +3450,7 @@ server_writev_vecsizer (int state, ssize_t *readsize, char *addr) size = xdr_sizeof ((xdrproc_t) xdr_gfs3_write_req, &write_req); - xdrmem_create (&xdr, addr, size, XDR_DECODE); + xdrmem_create (&xdr, base_addr, size, XDR_DECODE); /* This will fail if there is xdata sent from client, if not, well and good */ |