diff options
author | Alexander Aring <aahringo@redhat.com> | 2021-03-01 17:05:11 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2021-03-09 08:56:42 -0600 |
commit | e9a470acd930574be812663708dfad6f6f94d80a (patch) | |
tree | 8d3f51ccb65ae06f0c0aff7a5338fae34e47fc77 /fs | |
parent | b30a624f50d9b637ffe9ef3cf4c53abd5bc607d1 (diff) |
fs: dlm: set subclass for othercon sock_mutex
This patch sets the lockdep subclass for the othercon socket mutex. In
various places the connection socket mutex is held while locking the
othercon socket mutex. This patch will remove lockdep warnings when such
case occurs.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/lowcomms.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index f169e35d19f4..ca9bf54b94a9 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -934,13 +934,14 @@ static int accept_from_sock(struct listen_connection *con) goto accept_err; } + lockdep_set_subclass(&othercon->sock_mutex, 1); newcon->othercon = othercon; } else { /* close other sock con if we have something new */ close_connection(othercon, false, true, false); } - mutex_lock_nested(&othercon->sock_mutex, 1); + mutex_lock(&othercon->sock_mutex); add_sock(newsock, othercon); addcon = othercon; mutex_unlock(&othercon->sock_mutex); |