summaryrefslogtreecommitdiffstats
path: root/net/core/dst.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-19 21:31:33 +0200
committerDavid S. Miller <davem@davemloft.net>2012-07-20 22:31:21 +0200
commitf5b0a8743601a4477419171f5046bd07d1c080a0 (patch)
tree92e17ec293c3d0e35a0deda5d3bbf43710fb96ff /net/core/dst.c
parentipv4: Adjust semantics of rt->rt_gateway. (diff)
downloadlinux-f5b0a8743601a4477419171f5046bd07d1c080a0.tar.xz
linux-f5b0a8743601a4477419171f5046bd07d1c080a0.zip
net: Document dst->obsolete better.
Add a big comment explaining how the field works, and use defines instead of magic constants for the values assigned to it. Suggested by Joe Perches. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dst.c')
-rw-r--r--net/core/dst.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dst.c b/net/core/dst.c
index 07bacff84aa4..069d51d29414 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -94,7 +94,7 @@ loop:
* But we do not have state "obsoleted, but
* referenced by parent", so it is right.
*/
- if (dst->obsolete > 1)
+ if (dst->obsolete > 0)
continue;
___dst_free(dst);
@@ -202,7 +202,7 @@ static void ___dst_free(struct dst_entry *dst)
*/
if (dst->dev == NULL || !(dst->dev->flags&IFF_UP))
dst->input = dst->output = dst_discard;
- dst->obsolete = 2;
+ dst->obsolete = DST_OBSOLETE_DEAD;
}
void __dst_free(struct dst_entry *dst)