sctp: add sctp_sock_set_nodelay
Add a helper to directly set the SCTP_NODELAY sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
f26e9b2c0b
commit
40ef92c6ec
@@ -615,4 +615,11 @@ static inline bool sctp_newsk_ready(const struct sock *sk)
|
||||
return sock_flag(sk, SOCK_DEAD) || sk->sk_socket;
|
||||
}
|
||||
|
||||
static inline void sctp_sock_set_nodelay(struct sock *sk)
|
||||
{
|
||||
lock_sock(sk);
|
||||
sctp_sk(sk)->nodelay = true;
|
||||
release_sock(sk);
|
||||
}
|
||||
|
||||
#endif /* __net_sctp_h__ */
|
||||
|
Reference in New Issue
Block a user