lockd: shift grabbing a reference to nlm_host into nlm_alloc_call()

It's used both for client and server hosts; we can't do nlmclnt_release_host()
on failure exits, since the host might need nlmsvc_release_host(), with BUG_ON()
for calling the wrong one.  Makes life simpler for callers, actually...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2012-07-26 00:39:50 +04:00
förälder a51d9eaa41
incheckning 446945ab9a
4 ändrade filer med 4 tillägg och 8 borttagningar

Visa fil

@@ -294,6 +294,7 @@ static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args
return rpc_system_err;
call = nlm_alloc_call(host);
nlmsvc_release_host(host);
if (call == NULL)
return rpc_system_err;