diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2026-08-10 00:36:11 +0200 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-08-10 01:20:05 +0200 |
| commit | dbaafe9cc56a996931eedfe043eb34418cc9cd9b (patch) | |
| tree | 812b63d549e87c3fff744a21b75b73c8f096b5c5 /include/linux/inetdevice.h | |
| parent | 67b1e7245bd60f54f820859b9e400136a7b6d00a (diff) | |
| parent | db2ddb87143519e20a95aa36c60b36107b736a58 (diff) | |
Merge tag 'v7.2-rc7' into driver-core-next
We need the driver-core fixes in here as well to build on top of.
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
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) |
