From: "J. Bruce Fields" <bfields@fieldses.org>
To: Neil Brown <neilb@suse.de>
Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz>,
nfsv4@linux-nfs.org, linux-kernel@vger.kernel.org
Subject: Re: Oops in NFSv4 server in 2.6.23.17
Date: Wed, 19 Mar 2008 18:32:21 -0400 [thread overview]
Message-ID: <20080319223221.GL25636@fieldses.org> (raw)
In-Reply-To: <18397.43768.705353.514972@notabene.brown>
On Mon, Mar 17, 2008 at 10:19:20AM +1100, Neil Brown wrote:
> On Friday March 14, bfields@fieldses.org wrote:
> > On Fri, Mar 14, 2008 at 04:05:10PM -0400, bfields wrote:
> > > I find that a little contorted. So I'll go ahead and submit this small
> > > patch to 2.6.25 and stable now (I have since managed to reproduce what I
> > > believe is your bug, though my symptoms were a little different), and
> > > then submit to 2.6.26 some cleanup which makes this more understandable,
> >
> > Here's an attempt. We could break up fh_verify even more, though.--b.
>
> Looks like a good attempt.
>
> My only suggestion would be to put a comment at the top of
> nfsd_set_fh_dentry explaining what it does and who calls it.
OK! I'm planning to just add:
+/*
+ * Use the given filehandle to look up the corresponding export and
+ * dentry. On success, the results are used to set fh_export and
+ * fh_dentry.
+ */
static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp)
{
struct knfsd_fh *fh = &fhp->fh_handle;
(Nothing about "who calls it", but it's static and its only caller is
fh_verify, so that seemed uninteresting.) Anything else you were
looking for?
>
> It's long past time that code had some spring cleaning !!
If I had a little more time I think it might be clearer to make this:
fhp->fh_export = nfsd_fh_get_export(rqstp, &fhp->fh_handle);
if (IS_ERR(fhp->fh_export))
return ERR_PTR(fhp->fh_export);
error = nfsd_setuser_and_check_port(rqstp, exp);
if (error)
goto out;
fhp->fh_export = nfsd_fh_get_dentry(rqstp, &fhp->fh_handle);
if (IS_ERR(...))
etc., though that's probably not quite right.
--b.
next prev parent reply other threads:[~2008-03-19 23:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-12 12:25 Oops in NFSv4 server in 2.6.23.17 Lukas Hejtmanek
2008-03-12 16:00 ` J. Bruce Fields
2008-03-13 14:36 ` Lukas Hejtmanek
2008-03-14 18:14 ` J. Bruce Fields
2008-03-14 19:33 ` J. Bruce Fields
2008-03-14 19:53 ` Lukas Hejtmanek
2008-03-14 20:05 ` J. Bruce Fields
2008-03-14 23:37 ` [PATCH] nfsd: fix oops on access from high-numbered ports J. Bruce Fields
2008-03-14 23:42 ` Oops in NFSv4 server in 2.6.23.17 J. Bruce Fields
2008-03-16 23:19 ` Neil Brown
2008-03-19 22:32 ` J. Bruce Fields [this message]
2008-03-20 2:31 ` NeilBrown
2008-03-17 8:12 ` Lukas Hejtmanek
2008-03-17 13:15 ` J. Bruce Fields
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=20080319223221.GL25636@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=nfsv4@linux-nfs.org \
--cc=xhejtman@ics.muni.cz \
/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