diff options
author | J. Bruce Fields <bfields@redhat.com> | 2014-06-24 23:06:41 +0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-07-09 01:14:24 +0400 |
commit | 7fb84306f55d6cc32ea894d47cbb2faa18c8f45b (patch) | |
tree | f5acece1aa801757384012554f350e824696d857 /fs/nfsd/nfs4xdr.c | |
parent | 52ee04330f585d1b5bc40442f07df07248fa3aee (diff) | |
download | linux-7fb84306f55d6cc32ea894d47cbb2faa18c8f45b.tar.xz |
nfsd4: rename cr_linkname->cr_data
The name of a link is currently stored in cr_name and cr_namelen, and
the content in cr_linkname and cr_linklen. That's confusing.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index a1c48b4111d2..3d0749633d2b 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -598,20 +598,19 @@ nfsd4_decode_create(struct nfsd4_compoundargs *argp, struct nfsd4_create *create switch (create->cr_type) { case NF4LNK: READ_BUF(4); - create->cr_linklen = be32_to_cpup(p++); - READ_BUF(create->cr_linklen); + create->cr_datalen = be32_to_cpup(p++); + READ_BUF(create->cr_datalen); /* * The VFS will want a null-terminated string, and * null-terminating in place isn't safe since this might * end on a page boundary: */ - create->cr_linkname = - kmalloc(create->cr_linklen + 1, GFP_KERNEL); - if (!create->cr_linkname) + create->cr_data = kmalloc(create->cr_datalen + 1, GFP_KERNEL); + if (!create->cr_data) return nfserr_jukebox; - memcpy(create->cr_linkname, p, create->cr_linklen); - create->cr_linkname[create->cr_linklen] = '\0'; - defer_free(argp, kfree, create->cr_linkname); + memcpy(create->cr_data, p, create->cr_datalen); + create->cr_data[create->cr_datalen] = '\0'; + defer_free(argp, kfree, create->cr_data); break; case NF4BLK: case NF4CHR: |