Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90420
b: refs/heads/master
c: 8d33086
h: refs/heads/master
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Mar 28, 2008
1 parent d2e9ae0 commit 3d5c6fe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2aa270ad73d385bd6cdebf5d741bdf18a3e17ad
refs/heads/master: 8d3308687f7f1eaa1bb5d202d14752d5f90068eb
10 changes: 1 addition & 9 deletions trunk/include/net/dst.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,7 @@ struct dst_entry * dst_clone(struct dst_entry * dst)
return dst;
}

static inline
void dst_release(struct dst_entry * dst)
{
if (dst) {
WARN_ON(atomic_read(&dst->__refcnt) < 1);
smp_mb__before_atomic_dec();
atomic_dec(&dst->__refcnt);
}
}
extern void dst_release(struct dst_entry *dst);

/* Children define the path of the packet through the
* Linux networking. Thus, destinations are stackable.
Expand Down
10 changes: 10 additions & 0 deletions trunk/net/core/dst.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,16 @@ struct dst_entry *dst_destroy(struct dst_entry * dst)
return NULL;
}

void dst_release(struct dst_entry *dst)
{
if (dst) {
WARN_ON(atomic_read(&dst->__refcnt) < 1);
smp_mb__before_atomic_dec();
atomic_dec(&dst->__refcnt);
}
}
EXPORT_SYMBOL(dst_release);

/* Dirty hack. We did it in 2.2 (in __dst_free),
* we have _very_ good reasons not to repeat
* this mistake in 2.3, but we have no choice
Expand Down

0 comments on commit 3d5c6fe

Please sign in to comment.