aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4recover.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4recover.c')
-rw-r--r--fs/nfsd/nfs4recover.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index ebd03cc07479..6f03918018a3 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -88,7 +88,7 @@ nfs4_make_rec_clidname(char *dname, struct xdr_netobj *clname)
88{ 88{
89 struct xdr_netobj cksum; 89 struct xdr_netobj cksum;
90 struct hash_desc desc; 90 struct hash_desc desc;
91 struct scatterlist sg[1]; 91 struct scatterlist sg;
92 __be32 status = nfserr_resource; 92 __be32 status = nfserr_resource;
93 93
94 dprintk("NFSD: nfs4_make_rec_clidname for %.*s\n", 94 dprintk("NFSD: nfs4_make_rec_clidname for %.*s\n",
@@ -102,11 +102,9 @@ nfs4_make_rec_clidname(char *dname, struct xdr_netobj *clname)
102 if (cksum.data == NULL) 102 if (cksum.data == NULL)
103 goto out; 103 goto out;
104 104
105 sg[0].page = virt_to_page(clname->data); 105 sg_init_one(&sg, clname->data, clname->len);
106 sg[0].offset = offset_in_page(clname->data);
107 sg[0].length = clname->len;
108 106
109 if (crypto_hash_digest(&desc, sg, sg->length, cksum.data)) 107 if (crypto_hash_digest(&desc, &sg, sg.length, cksum.data))
110 goto out; 108 goto out;
111 109
112 md5_to_hex(dname, cksum.data); 110 md5_to_hex(dname, cksum.data);