Commit 5c96dea4 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] kNFSd: exp_find(): remove null pointer check

If ek = exp_find_key() is not an error, then ek->ek_export should be set; no
point in checking if it's NULL.

From: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0b1d57cf
...@@ -124,8 +124,7 @@ exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv, ...@@ -124,8 +124,7 @@ exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv,
int err; int err;
exp_get(exp); exp_get(exp);
expkey_put(&ek->h, &svc_expkey_cache); expkey_put(&ek->h, &svc_expkey_cache);
if (exp && if ((err = cache_check(&svc_export_cache, &exp->h, reqp)))
(err = cache_check(&svc_export_cache, &exp->h, reqp)))
exp = ERR_PTR(err); exp = ERR_PTR(err);
return exp; return exp;
} else } else
......
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