From: Steve Dickson <SteveD@redhat.com>
To: NeilBrown <neilb@suse.de>, NFS <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH - nfs-utils] mountd: fix next_mnt handling for "/"
Date: Thu, 26 Feb 2015 14:37:32 -0500 [thread overview]
Message-ID: <54EF75FC.9070904@RedHat.com> (raw)
In-Reply-To: <20150216121856.7efe2237@notabene.brown>
On 02/15/2015 08:18 PM, NeilBrown wrote:
>
>
> If the (exported) path passed to next_mnt() is simply "/", next_mnt()
> will not report any children, as none start with "/" followed by
> a '/'.
> So make a special case for strlen(p)==1. In that case, return all
> children.
>
> This gives correct handling if only "/" is exported.
>
> Signed-off-by: NeilBrown <neilb@suse.de>
Committed!
steved.
>
> diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
> index c23d384d24eb..ac36b6d9f21e 100644
> --- a/utils/mountd/cache.c
> +++ b/utils/mountd/cache.c
> @@ -377,6 +377,7 @@ static char *next_mnt(void **v, char *p)
> } else
> f = *v;
> while ((me = getmntent(f)) != NULL &&
> + l > 1 &&
> (strncmp(me->mnt_dir, p, l) != 0 ||
> me->mnt_dir[l] != '/'))
> ;
>
prev parent reply other threads:[~2015-02-26 19:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-16 1:18 [PATCH - nfs-utils] mountd: fix next_mnt handling for "/" NeilBrown
2015-02-26 19:37 ` Steve Dickson [this message]
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=54EF75FC.9070904@RedHat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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).