Skip to content

Commit

Permalink
fs: dlm: don't check othercon twice
Browse files Browse the repository at this point in the history
This patch removes an another check if con->othercon set inside the
branch which already does that.

Signed-off-by: Alexander Aring <[email protected]>
Signed-off-by: David Teigland <[email protected]>
  • Loading branch information
Alexander Aring authored and teigland committed Jun 14, 2023
1 parent cbba211 commit f8bce79
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -1497,8 +1497,7 @@ int dlm_lowcomms_close(int nodeid)
call_srcu(&connections_srcu, &con->rcu, connection_release);
if (con->othercon) {
clean_one_writequeue(con->othercon);
if (con->othercon)
call_srcu(&connections_srcu, &con->othercon->rcu, connection_release);
call_srcu(&connections_srcu, &con->othercon->rcu, connection_release);
}
srcu_read_unlock(&connections_srcu, idx);

Expand Down

0 comments on commit f8bce79

Please sign in to comment.