Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c9b6cbe56d3ac471e6cd72a59ec9e324b3417016 Commit: c9b6cbe56d3ac471e6cd72a59ec9e324b3417016 Parent: 2fdada03b3876ab9f84ede160f187e888cafefb4 Author: J. Bruce Fields <[EMAIL PROTECTED]> AuthorDate: Fri Jul 27 16:36:45 2007 -0400 Committer: J. Bruce Fields <[EMAIL PROTECTED]> CommitDate: Tue Oct 9 18:31:56 2007 -0400
knfsd: nfs4 name->id mapping not correctly parsing negative downcall Note that qword_get() returns length or -1, not an -ERROR. Signed-off-by: "J. Bruce Fields" <[EMAIL PROTECTED]> Acked-by: Neil Brown <[EMAIL PROTECTED]> --- fs/nfsd/nfs4idmap.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index 2ccffde..4c0c683 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c @@ -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) { - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html