patch-2.4.0-test7 linux/net/sched/cls_tcindex.c

Next file: linux/net/sched/sch_generic.c
Previous file: linux/net/packet/af_packet.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test6/linux/net/sched/cls_tcindex.c linux/net/sched/cls_tcindex.c
@@ -170,23 +170,17 @@
 		int i;
 		struct tcindex_filter **walk = NULL;
 
-		for (i = 0; !f && i < p->hash; i++) {
-			for (walk = p->h+i; !f && *walk; walk = &(*walk)->next) {
+		for (i = 0; i < p->hash; i++)
+			for (walk = p->h+i; *walk; walk = &(*walk)->next)
 				if (&(*walk)->result == r)
-					f = *walk;
-			}
-		}
-		if (!f)
-			return -ENOENT;
-/*
- @@@ OK?  -- No (jhs)
-Look more into it
+					goto found;
+		return -ENOENT;
+
+found:
+		f = *walk;
 		tcf_tree_lock(tp); 
-*/
 		*walk = f->next;
-/*
 		tcf_tree_unlock(tp);
-*/
 	}
 	cl = __cls_set_class(&r->res.class,0);
 	if (cl)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)