]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: add function to take snapshot while locked
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 26 Mar 2020 18:37:11 +0000 (11:37 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Mar 2020 02:39:26 +0000 (19:39 -0700)
commite919a014012f184399efe69e49c7ae54b1500288
tree6d17125b463f634844a5f02773037b96d63dba1b
parent0ce2928a3a743bd809cb63c85772137e4af99a46
devlink: add function to take snapshot while locked

A future change is going to add a new devlink command to request
a snapshot on demand. This function will want to call the
devlink_region_snapshot_create function while already holding the
devlink instance lock.

Extract the logic of this function into a static function prefixed by
`__` to indicate that it is an internal helper function. Modify the
original function to be implemented in terms of the new locked
function.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c