Commit c9b6cbe5 authored by J. Bruce Fields's avatar J. Bruce Fields

knfsd: nfs4 name->id mapping not correctly parsing negative downcall

Note that qword_get() returns length or -1, not an -ERROR.
Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
Acked-by: default avatarNeil Brown <neilb@suse.de>
parent 2fdada03
......@@ -207,6 +207,7 @@ idtoname_parse(struct cache_detail *cd, char *buf, int buflen)
{
struct ent ent, *res;
char *buf1, *bp;
int len;
int error = -EINVAL;
if (buf[buflen - 1] != '\n')
......@@ -248,10 +249,11 @@ idtoname_parse(struct cache_detail *cd, char *buf, int buflen)
goto out;
/* Name */
error = qword_get(&buf, buf1, PAGE_SIZE);
if (error == -EINVAL)
error = -EINVAL;
len = qword_get(&buf, buf1, PAGE_SIZE);
if (len < 0)
goto out;
if (error == -ENOENT)
if (len == 0)
set_bit(CACHE_NEGATIVE, &ent.h.flags);
else {
if (error >= IDMAP_NAMESZ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment