diff options
author | Maor Gottlieb <maorg@mellanox.com> | 2017-08-27 09:07:44 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2017-09-26 20:52:03 +0300 |
commit | c7784b1c8ab3f44dc2e643a8feb77584792c9108 (patch) | |
tree | a49472097536b895195ecf02f855a5c23d663fc8 /drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | |
parent | 19f100fef4ad46f21cfdfb1eeeb63fc38c2e57f1 (diff) | |
download | linux-c7784b1c8ab3f44dc2e643a8feb77584792c9108.tar.xz |
net/mlx5: Replace fs_node mutex with reader/writer semaphore
Currently, steering object is protected by mutex lock, replace
the mutex lock with reader/writer semaphore .
In this patch we still use only write semaphore. In downstream
patches we will switch part of the write locks to read locks.
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fs_core.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h index 6e5d25b4f8de..b5c079f35051 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h @@ -80,7 +80,7 @@ struct fs_node { struct fs_node *parent; struct fs_node *root; /* lock the node for writing and traversing */ - struct mutex lock; + struct rw_semaphore lock; atomic_t refcount; bool active; void (*remove_func)(struct fs_node *); |