Commit 6dfcde98 authored by Krishna Kumar's avatar Krishna Kumar Committed by J. Bruce Fields

nfsd: Drop reference in expkey_parse error cases

Drop reference to export key on error. Compile tested.
Signed-off-by: default avatarKrishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 6c6a426f
...@@ -151,8 +151,10 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen) ...@@ -151,8 +151,10 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
/* now we want a pathname, or empty meaning NEGATIVE */ /* now we want a pathname, or empty meaning NEGATIVE */
err = -EINVAL; err = -EINVAL;
if ((len=qword_get(&mesg, buf, PAGE_SIZE)) < 0) if ((len=qword_get(&mesg, buf, PAGE_SIZE)) < 0) {
cache_put(&ek->h, &svc_expkey_cache);
goto out; goto out;
}
dprintk("Path seems to be <%s>\n", buf); dprintk("Path seems to be <%s>\n", buf);
err = 0; err = 0;
if (len == 0) { if (len == 0) {
...@@ -164,8 +166,10 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen) ...@@ -164,8 +166,10 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
} else { } else {
struct nameidata nd; struct nameidata nd;
err = path_lookup(buf, 0, &nd); err = path_lookup(buf, 0, &nd);
if (err) if (err) {
cache_put(&ek->h, &svc_expkey_cache);
goto out; goto out;
}
dprintk("Found the path %s\n", buf); dprintk("Found the path %s\n", buf);
key.ek_path = nd.path; key.ek_path = nd.path;
......
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