aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/export.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 9dc036f18356..7ce2c6e4e23e 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -151,8 +151,10 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
151 151
152 /* now we want a pathname, or empty meaning NEGATIVE */ 152 /* now we want a pathname, or empty meaning NEGATIVE */
153 err = -EINVAL; 153 err = -EINVAL;
154 if ((len=qword_get(&mesg, buf, PAGE_SIZE)) < 0) 154 if ((len=qword_get(&mesg, buf, PAGE_SIZE)) < 0) {
155 cache_put(&ek->h, &svc_expkey_cache);
155 goto out; 156 goto out;
157 }
156 dprintk("Path seems to be <%s>\n", buf); 158 dprintk("Path seems to be <%s>\n", buf);
157 err = 0; 159 err = 0;
158 if (len == 0) { 160 if (len == 0) {
@@ -164,8 +166,10 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
164 } else { 166 } else {
165 struct nameidata nd; 167 struct nameidata nd;
166 err = path_lookup(buf, 0, &nd); 168 err = path_lookup(buf, 0, &nd);
167 if (err) 169 if (err) {
170 cache_put(&ek->h, &svc_expkey_cache);
168 goto out; 171 goto out;
172 }
169 173
170 dprintk("Found the path %s\n", buf); 174 dprintk("Found the path %s\n", buf);
171 key.ek_path = nd.path; 175 key.ek_path = nd.path;