aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip_vs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r--include/net/ip_vs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 1c2e1b9f6b86..cd7275f9c463 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1442,6 +1442,12 @@ static inline void ip_vs_dest_put(struct ip_vs_dest *dest)
1442 atomic_dec(&dest->refcnt); 1442 atomic_dec(&dest->refcnt);
1443} 1443}
1444 1444
1445static inline void ip_vs_dest_put_and_free(struct ip_vs_dest *dest)
1446{
1447 if (atomic_dec_return(&dest->refcnt) < 0)
1448 kfree(dest);
1449}
1450
1445/* 1451/*
1446 * IPVS sync daemon data and function prototypes 1452 * IPVS sync daemon data and function prototypes
1447 * (from ip_vs_sync.c) 1453 * (from ip_vs_sync.c)