]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/nfsd/nfs3xdr.c
Merge branch 'for-5.5/core' into for-linus
[linux.git] / fs / nfsd / nfs3xdr.c
index fcf31822c74c0b6e04616e45fbe915eacd9fc3ac..86e5658651f1066e359949571deb0c8ee9eb0a77 100644 (file)
@@ -27,6 +27,7 @@ static u32    nfs3_ftypes[] = {
        NF3SOCK, NF3BAD,  NF3LNK, NF3BAD,
 };
 
+
 /*
  * XDR functions for basic NFS types
  */
@@ -751,14 +752,16 @@ nfs3svc_encode_writeres(struct svc_rqst *rqstp, __be32 *p)
 {
        struct nfsd3_writeres *resp = rqstp->rq_resp;
        struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
+       __be32 verf[2];
 
        p = encode_wcc_data(rqstp, p, &resp->fh);
        if (resp->status == 0) {
                *p++ = htonl(resp->count);
                *p++ = htonl(resp->committed);
                /* unique identifier, y2038 overflow can be ignored */
-               *p++ = htonl((u32)nn->nfssvc_boot.tv_sec);
-               *p++ = htonl(nn->nfssvc_boot.tv_nsec);
+               nfsd_copy_boot_verifier(verf, nn);
+               *p++ = verf[0];
+               *p++ = verf[1];
        }
        return xdr_ressize_check(rqstp, p);
 }
@@ -1125,13 +1128,15 @@ nfs3svc_encode_commitres(struct svc_rqst *rqstp, __be32 *p)
 {
        struct nfsd3_commitres *resp = rqstp->rq_resp;
        struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
+       __be32 verf[2];
 
        p = encode_wcc_data(rqstp, p, &resp->fh);
        /* Write verifier */
        if (resp->status == 0) {
                /* unique identifier, y2038 overflow can be ignored */
-               *p++ = htonl((u32)nn->nfssvc_boot.tv_sec);
-               *p++ = htonl(nn->nfssvc_boot.tv_nsec);
+               nfsd_copy_boot_verifier(verf, nn);
+               *p++ = verf[0];
+               *p++ = verf[1];
        }
        return xdr_ressize_check(rqstp, p);
 }