[PATCH 2/2] mountd: Removed duplicate check from insert_groups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux