]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
devlink: Add comment for devlink instance lock
authorParav Pandit <parav@mellanox.com>
Tue, 21 Jul 2020 16:53:53 +0000 (19:53 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 23:14:58 +0000 (16:14 -0700)
Add comment to describe the purpose of devlink instance lock.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h

index 913e8679ae35a5f8e29404db0b11845291049492..19d990c8edcc965a9b98057daa23b1b968952a1e 100644 (file)
@@ -40,7 +40,9 @@ struct devlink {
        struct xarray snapshot_ids;
        struct device *dev;
        possible_net_t _net;
-       struct mutex lock;
+       struct mutex lock; /* Serializes access to devlink instance specific objects such as
+                           * port, sb, dpipe, resource, params, region, traps and more.
+                           */
        u8 reload_failed:1,
           reload_enabled:1,
           registered:1;