LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Jeff Layton <jlayton@redhat.com>
Cc: akpm@linux-foundation.org, linux-nfs@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] NLM: Have lockd call try_to_freeze
Date: Mon, 14 Jan 2008 09:24:51 +1100	[thread overview]
Message-ID: <18314.36787.541818.450563@notabene.brown> (raw)
In-Reply-To: message from Jeff Layton on Sunday January 13

On Sunday January 13, jlayton@redhat.com wrote:
> On Thu, 10 Jan 2008 13:01:34 -0500
> Jeff Layton <jlayton@redhat.com> wrote:
> 
> > lockd makes itself freezable, but never calls try_to_freeze(). Have it
> > call try_to_freeze() within the main loop.
> > 
> > Signed-off-by: Jeff Layton <jlayton@redhat.com>
> > ---
> >  fs/lockd/svc.c |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)
> > 
> > diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
> > index 82e2192..6ee8bed 100644
> > --- a/fs/lockd/svc.c
> > +++ b/fs/lockd/svc.c
> > @@ -155,6 +155,9 @@ lockd(struct svc_rqst *rqstp)
> >  		long timeout = MAX_SCHEDULE_TIMEOUT;
> >  		char buf[RPC_MAX_ADDRBUFLEN];
> >  
> > +		if (try_to_freeze())
> > +			continue;
> > +
> >  		if (signalled()) {
> >  			flush_signals(current);
> >  			if (nlmsvc_ops) {
> 
> 
> I was looking over svc_recv today and noticed that it calls
> try_to_freeze a couple of times. Given that, the above patch may be
> unnecessary. I don't think it hurts anything though. Should we keep
> this patch or drop it?

I would suggest dropping it.
Having unnecessary code is likely to be confusing.

NeilBrown

  reply	other threads:[~2008-01-13 22:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-10 18:01 [PATCH 0/5] Intro: convert lockd to kthread and fix use-after-free (try #7) Jeff Layton
2008-01-10 18:01 ` [PATCH 1/5] SUNRPC: spin svc_rqst initialization to its own function Jeff Layton
2008-01-10 18:01   ` [PATCH 2/5] SUNRPC: export svc_sock_update_bufs Jeff Layton
2008-01-10 18:01     ` [PATCH 3/5] NLM: Have lockd call try_to_freeze Jeff Layton
2008-01-10 18:01       ` [PATCH 4/5] NLM: Convert lockd to use kthreads Jeff Layton
2008-01-10 18:01         ` [PATCH 5/5] NLM: have nlm_shutdown_hosts kill off all NLM RPC tasks Jeff Layton
2008-01-13 11:54       ` [PATCH 3/5] NLM: Have lockd call try_to_freeze Jeff Layton
2008-01-13 22:24         ` Neil Brown [this message]
2008-01-13 23:59           ` Rafael J. Wysocki
2008-01-11  1:37 ` [PATCH 0/5] Intro: convert lockd to kthread and fix use-after-free (try #7) Neil Brown

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=18314.36787.541818.450563@notabene.brown \
    --to=neilb@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).