From 8161b0a9a8c5a6aeec20fcee45707e21bef31f56 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Fri, 26 Oct 2007 13:32:50 -0400 Subject: [PATCH] --- yaml --- r: 82405 b: refs/heads/master c: d4395e03fec0895d01451904b8a2276ceda663c9 h: refs/heads/master i: 82403: 23a1926b08b2f13dac9c5002cdfccd3eeea830bc v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4idmap.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 8c7e5d4aa1aa..9f842d523174 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aefa89d178e6dd83889b66d4e800d4d77363900b +refs/heads/master: d4395e03fec0895d01451904b8a2276ceda663c9 diff --git a/trunk/fs/nfsd/nfs4idmap.c b/trunk/fs/nfsd/nfs4idmap.c index 4c0c683ce07a..5b56c77c15c5 100644 --- a/trunk/fs/nfsd/nfs4idmap.c +++ b/trunk/fs/nfsd/nfs4idmap.c @@ -255,13 +255,10 @@ idtoname_parse(struct cache_detail *cd, char *buf, int buflen) goto out; if (len == 0) set_bit(CACHE_NEGATIVE, &ent.h.flags); - else { - if (error >= IDMAP_NAMESZ) { - error = -EINVAL; - goto out; - } + else if (len >= IDMAP_NAMESZ) + goto out; + else memcpy(ent.name, buf1, sizeof(ent.name)); - } error = -ENOMEM; res = idtoname_update(&ent, res); if (res == NULL)