From: Matthew Treinish <treinish@linux.vnet.ibm.com>
To: linux-nfs@vger.kernel.org
Cc: Matthew Treinish <treinish@linux.vnet.ibm.com>
Subject: [PATCH 2/2] mountd: Removed duplicate check from insert_groups
Date: Mon, 1 Aug 2011 15:02:27 -0400 [thread overview]
Message-ID: <1312225347-11282-2-git-send-email-treinish@linux.vnet.ibm.com> (raw)
In-Reply-To: <1312225347-11282-1-git-send-email-treinish@linux.vnet.ibm.com>
Upon further inspection of mountd the duplicate check in insert group is not
needed. It seems that export_read() already filters out duplicates so the
check for duplicates again in insert groups isn't needed.
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
---
utils/mountd/mountd.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
index bcf5080..9c27d6c 100644
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -631,11 +631,6 @@ static exportnode *lookup_or_create_elist_entry(exports *elist, nfs_export *exp)
static void insert_group(struct exportnode *e, char *newname)
{
struct groupnode *g;
-
- for (g = e->ex_groups; g; g = g->gr_next)
- if (!strcmp(g->gr_name, newname))
- return;
-
g = xmalloc(sizeof(*g));
g->gr_name = xstrdup(newname);
g->gr_next = e->ex_groups;
--
1.7.4.4
next prev parent reply other threads:[~2011-08-01 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-01 19:02 [PATCH 1/2] mountd: Fixed strcmp usage in in insert groups Matthew Treinish
2011-08-01 19:02 ` Matthew Treinish [this message]
2011-08-03 17:46 ` [PATCH 2/2] mountd: Removed duplicate check from insert_groups Steve Dickson
2011-08-03 17:45 ` [PATCH 1/2] mountd: Fixed strcmp usage in in insert groups Steve Dickson
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=1312225347-11282-2-git-send-email-treinish@linux.vnet.ibm.com \
--to=treinish@linux.vnet.ibm.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 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).