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 5aad4d4842eba203f7ae8c826362db52be2a31cb..b28505b8b23b5b4b1c45bc32b4a31b9c9dc9842e 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);