diff options
| author | Tejun Heo <tj@kernel.org> | 2026-10-07 08:01:02 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-10-07 08:01:02 -1000 |
| commit | 92b542db38bf7cb4de583b2ca37febc549db0ce4 (patch) | |
| tree | 30dcfdb338f7fdba597e1ec9314c2006df86f525 /include/linux/inetdevice.h | |
| parent | fee1265a725725dac0ff7459f912d69558798b36 (diff) | |
| parent | d1a4549a3645e55cc9ade09e360280590b3c9559 (diff) | |
| download | linux-next-92b542db38bf7cb4de583b2ca37febc549db0ce4.tar.gz linux-next-92b542db38bf7cb4de583b2ca37febc549db0ce4.zip | |
Merge branch 'for-7.3-fixes' into for-next
Diffstat (limited to 'include/linux/inetdevice.h')
| -rw-r--r-- | include/linux/inetdevice.h | 5 |
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) |
