lkml.org 
[lkml]   [2007]   [Dec]   [28]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 27 Dec 2007 21:18:08 -0800 (PST)
SubjectRe: fib6_del_route has redundant code
FromDavid Miller <>
From: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Date: Thu, 27 Dec 2007 15:26:46 +0800

> I think the following code in fib6_del_route in the latest kernel is useless.
> 1125         if (fn->leaf == NULL && fn->fn_flags&RTN_TL_ROOT)
> 1126                 fn->leaf = &ip6_null_entry;
> 
> ip6_null_entry will never be unlinked from fn->leaf now, that is,
> fn->leaf == NULL will never meet.

I think you are right, but if it is true the next block of
code is dead too:

	/* If it was last route, expunge its radix tree node */
	if (fn->leaf == NULL) {
		fn->fn_flags &= ~RTN_RTINFO;
		rt6_stats.fib_route_nodes--;
		fn = fib6_repair_tree(fn);
	}
But I am not completely convinced that all of these lines
of code can be removed :-)


\
 
 \ /
  Last update: 2007-12-28 06:21    [from the cache]
©2003-2008