aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/devlink.h
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2020-03-26 11:37:13 -0700
committerDavid S. Miller <davem@davemloft.net>2020-03-26 19:39:26 -0700
commit7000108f27b1b421d388af0da0edc1d9cf13fd3c (patch)
treee2283eeececd884174542f5d5bbe123d813a7088 /include/net/devlink.h
parentdevlink: use -ENOSPC to indicate no more room for snapshots (diff)
downloadwireguard-linux-7000108f27b1b421d388af0da0edc1d9cf13fd3c.tar.xz
wireguard-linux-7000108f27b1b421d388af0da0edc1d9cf13fd3c.zip
devlink: extract snapshot id allocation to helper function
A future change is going to implement a new devlink command to request a snapshot on demand. As part of this, the logic for handling the snapshot ids will be refactored. To simplify the snapshot id allocation function, move it to a separate function prefixed by `__`. This helper function will assume the lock is held. While no other callers will exist, it simplifies refactoring the logic because there is no need to complicate the function with gotos to handle unlocking on failure. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/devlink.h')
0 files changed, 0 insertions, 0 deletions