summaryrefslogtreecommitdiffstats
path: root/include/net/addrconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/addrconf.h')
-rw-r--r--include/net/addrconf.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 6df79e9..f44ff24 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -336,6 +336,16 @@ static inline void in6_dev_put(struct inet6_dev *idev)
in6_dev_finish_destroy(idev);
}
+static inline void in6_dev_put_clear(struct inet6_dev **pidev)
+{
+ struct inet6_dev *idev = *pidev;
+
+ if (idev) {
+ in6_dev_put(idev);
+ *pidev = NULL;
+ }
+}
+
static inline void __in6_dev_put(struct inet6_dev *idev)
{
refcount_dec(&idev->refcnt);
OpenPOWER on IntegriCloud