Skip to content

Commit 39f9c2e

Browse files
committed
devlink: add devl guard
JIRA: https://issues.redhat.com/browse/RHEL-75600 Upstream commit(s): commit 0502bd2 Author: Konrad Knitter <[email protected]> Date: Wed Nov 6 10:36:42 2024 +0100 devlink: add devl guard Add devl guard for scoped_guard(). Example usage: scoped_guard(devl, priv_to_devlink(pf)) { err = init_devlink(pf); if (err) return err; } Co-developed-by: Przemek Kitszel <[email protected]> Signed-off-by: Przemek Kitszel <[email protected]> Signed-off-by: Konrad Knitter <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]> Signed-off-by: Petr Oros <[email protected]>
1 parent d01f5be commit 39f9c2e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/net/devlink.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,7 @@ int devl_trylock(struct devlink *devlink);
15631563
void devl_unlock(struct devlink *devlink);
15641564
void devl_assert_locked(struct devlink *devlink);
15651565
bool devl_lock_is_held(struct devlink *devlink);
1566+
DEFINE_GUARD(devl, struct devlink *, devl_lock(_T), devl_unlock(_T));
15661567

15671568
struct ib_device;
15681569

0 commit comments

Comments
 (0)