fs: dlm: don't check othercon twice
authorAlexander Aring <aahringo@redhat.com>
Mon, 29 May 2023 21:44:33 +0000 (17:44 -0400)
committerDavid Teigland <teigland@redhat.com>
Wed, 14 Jun 2023 15:17:33 +0000 (10:17 -0500)
This patch removes an another check if con->othercon set inside the
branch which already does that.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lowcomms.c

index 5aad4d4..b28505b 100644 (file)
@@ -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);