smc: no update for unused sk_write_pending
authorUrsula Braun <ubraun@linux.vnet.ibm.com>
Thu, 7 Dec 2017 12:38:46 +0000 (13:38 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Dec 2017 20:03:12 +0000 (15:03 -0500)
The smc code never checks the sk_write_pending sock field.
Thus there is no need to update it.

Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_tx.c

index c48dc2d5fd3ac32227e352afd749c6b952ed4fce..77555c6ed199380ce2cde0e2361b2bee0989604f 100644 (file)
@@ -104,14 +104,12 @@ static int smc_tx_wait_memory(struct smc_sock *smc, int flags)
                if (atomic_read(&conn->sndbuf_space))
                        break; /* at least 1 byte of free space available */
                set_bit(SOCK_NOSPACE, &sk->sk_socket->flags);
-               sk->sk_write_pending++;
                sk_wait_event(sk, &timeo,
                              sk->sk_err ||
                              (sk->sk_shutdown & SEND_SHUTDOWN) ||
                              smc_cdc_rxed_any_close_or_senddone(conn) ||
                              atomic_read(&conn->sndbuf_space),
                              &wait);
-               sk->sk_write_pending--;
        }
        remove_wait_queue(sk_sleep(sk), &wait);
        return rc;