Message ID | 1312225347-11282-2-git-send-email-treinish@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 08/01/2011 03:02 PM, Matthew Treinish wrote: > 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. I think this check is still needed so for now I'm going to leave it... steved. > > 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; -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;
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(-)