All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jlayton@redhat.com>
Cc: Trond.Myklebust@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] lockd: eliminate duplicate calls to nlmsvc_lookup_host in nlmsvc_lock and nlmsvc_testlock
Date: Tue, 15 Jul 2008 14:45:54 -0400	[thread overview]
Message-ID: <20080715184554.GD21590@fieldses.org> (raw)
In-Reply-To: <1215868630-28201-1-git-send-email-jlayton@redhat.com>

On Sat, Jul 12, 2008 at 09:17:10AM -0400, Jeff Layton wrote:
> Both nlmsvc_lock and nlmsvc_testlock call nlmsvc_lookup_host to find a
> nlm_host struct. All the callers of these functions, however, call
> nlmsvc_retrieve_args or nlm4svc_retrieve_args which also return a
> nlm_host struct.
> 
> Change nlmsvc_lock and nlmsvc_testlock to take a host arg instead of
> calling nlmsvc_lookup_host themselves and change the callers to pass
> a pointer to the nlm_host they've already found.

That makes sense to me, thanks.

> Also, get rid of some unneeded nlm_host NULL checks.
> 
> I think I've got the reference counting right with this patch, but
> I wouldn't mind someone sanity checking it.

So, the way I do that sanity-checking is by breaking up the individual
changes as finely as I can, as follows....

--b.

  reply	other threads:[~2008-07-15 18:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-12 13:17 [PATCH] lockd: eliminate duplicate calls to nlmsvc_lookup_host in nlmsvc_lock and nlmsvc_testlock Jeff Layton
2008-07-15 18:45 ` J. Bruce Fields [this message]
2008-07-15 18:48   ` [PATCH 1/4] lockd: nlm_release_host() checks for NULL, caller needn't J. Bruce Fields
2008-07-15 18:48     ` [PATCH 2/4] lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_testlock J. Bruce Fields
2008-07-15 18:48       ` [PATCH 3/4] lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_lock J. Bruce Fields
2008-07-15 18:48         ` [PATCH 4/4] lockd: minor svclock.c style fixes J. Bruce Fields
2008-07-15 18:56         ` [PATCH 3/4] lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_lock J. Bruce Fields
2008-07-15 19:09       ` [PATCH 2/4] lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_testlock J. Bruce Fields
2008-07-15 19:32         ` Jeff Layton
     [not found]           ` <20080715153222.1a894180-RtJpwOs3+0O+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2008-07-15 19:41             ` J. Bruce Fields
2008-07-15 19:13   ` [PATCH] lockd: eliminate duplicate calls to nlmsvc_lookup_host in nlmsvc_lock and nlmsvc_testlock Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080715184554.GD21590@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.