Thread (62 messages) 62 messages, 4 authors, 2020-02-04

Re: [PATCH 02/15] devlink: add functions to take snapshot while locked

From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-01-31 18:07:09

On Thu, 30 Jan 2020 14:58:57 -0800, Jacob Keller wrote:
+static int
+devlink_region_snapshot_create_locked(struct devlink_region *region,
+				      u8 *data, u32 snapshot_id,
+				      devlink_snapshot_data_dest_t *destructor)
-1 on the _locked suffix. Please follow the time-honored tradition of
using double underscore for internal helpers which make assumption
about calling context.
+{
+	struct devlink_snapshot *snapshot;
lockdep_assert_held() is much better than just a kdoc comment.
+	/* check if region can hold one more snapshot */
+	if (region->cur_snapshots == region->max_snapshots)
+		return -ENOMEM;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help