From: Chuck Lever Date: Wed, 27 Aug 2008 20:57:15 +0000 (-0400) Subject: NLM: Clean up before introducing new debugging messages X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c2526f42711d93f3455f92a82b5e586880fc44be;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git NLM: Clean up before introducing new debugging messages We're about to introduce some extra debugging messages in nlm_lookup_host(). Bring the coding style up to date first so we can cleanly introduce the new debugging messages. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields --- diff --git a/fs/lockd/host.c b/fs/lockd/host.c index a17664c7eacc..cb26e3d952a2 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -103,16 +103,19 @@ static struct nlm_host *nlm_lookup_host(int server, nlm_get_host(host); goto out; } - if (nsm) - atomic_inc(&nsm->sm_count); - - host = NULL; - /* Sadly, the host isn't in our hash table yet. See if - * we have an NSM handle for it. If not, create one. + /* + * The host wasn't in our hash table. If we don't + * have an NSM handle for it yet, create one. */ - if (!nsm && !(nsm = nsm_find(sin, hostname, hostname_len))) - goto out; + if (nsm) + atomic_inc(&nsm->sm_count); + else { + host = NULL; + nsm = nsm_find(sin, hostname, hostname_len); + if (!nsm) + goto out; + } host = kzalloc(sizeof(*host), GFP_KERNEL); if (!host) {