summaryrefslogtreecommitdiff
path: root/include/linux/inetdevice.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-07-13 07:11:57 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-07-13 07:11:57 +0200
commitc1d4ce2d9eaeccd7e8aef7ec1109df49eaf4f503 (patch)
treecdb1b2876a231901613867976421092ddbb2d46f /include/linux/inetdevice.h
parentbef5e068b89b0f0cf974c987ebba9869a14b44c6 (diff)
parenta13c140cc289c0b7b3770bce5b3ad42ab35074aa (diff)
Merge 7.2-rc3 into tty-next
We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/inetdevice.h')
-rw-r--r--include/linux/inetdevice.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index dccbeb25f701..6032eea2539a 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -293,6 +293,11 @@ static inline void in_dev_put(struct in_device *idev)
#define __in_dev_put(idev) refcount_dec(&(idev)->refcnt)
#define in_dev_hold(idev) refcount_inc(&(idev)->refcnt)
+static inline bool in_dev_hold_safe(struct in_device *idev)
+{
+ return refcount_inc_not_zero(&idev->refcnt);
+}
+
#endif /* __KERNEL__ */
static __inline__ __be32 inet_make_mask(int logmask)