aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/export.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r--fs/nfsd/export.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index c7bbf460b009..6ab8de40904c 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1265,7 +1265,7 @@ struct svc_export *
1265rqst_exp_get_by_name(struct svc_rqst *rqstp, struct vfsmount *mnt, 1265rqst_exp_get_by_name(struct svc_rqst *rqstp, struct vfsmount *mnt,
1266 struct dentry *dentry) 1266 struct dentry *dentry)
1267{ 1267{
1268 struct svc_export *gssexp, *exp = NULL; 1268 struct svc_export *gssexp, *exp = ERR_PTR(-ENOENT);
1269 1269
1270 if (rqstp->rq_client == NULL) 1270 if (rqstp->rq_client == NULL)
1271 goto gss; 1271 goto gss;
@@ -1288,7 +1288,7 @@ gss:
1288 &rqstp->rq_chandle); 1288 &rqstp->rq_chandle);
1289 if (PTR_ERR(gssexp) == -ENOENT) 1289 if (PTR_ERR(gssexp) == -ENOENT)
1290 return exp; 1290 return exp;
1291 if (exp && !IS_ERR(exp)) 1291 if (!IS_ERR(exp))
1292 exp_put(exp); 1292 exp_put(exp);
1293 return gssexp; 1293 return gssexp;
1294} 1294}
@@ -1296,7 +1296,7 @@ gss:
1296struct svc_export * 1296struct svc_export *
1297rqst_exp_find(struct svc_rqst *rqstp, int fsid_type, u32 *fsidv) 1297rqst_exp_find(struct svc_rqst *rqstp, int fsid_type, u32 *fsidv)
1298{ 1298{
1299 struct svc_export *gssexp, *exp = NULL; 1299 struct svc_export *gssexp, *exp = ERR_PTR(-ENOENT);
1300 1300
1301 if (rqstp->rq_client == NULL) 1301 if (rqstp->rq_client == NULL)
1302 goto gss; 1302 goto gss;
@@ -1318,7 +1318,7 @@ gss:
1318 &rqstp->rq_chandle); 1318 &rqstp->rq_chandle);
1319 if (PTR_ERR(gssexp) == -ENOENT) 1319 if (PTR_ERR(gssexp) == -ENOENT)
1320 return exp; 1320 return exp;
1321 if (exp && !IS_ERR(exp)) 1321 if (!IS_ERR(exp))
1322 exp_put(exp); 1322 exp_put(exp);
1323 return gssexp; 1323 return gssexp;
1324} 1324}