diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-13 08:46:26 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-13 08:46:26 +0300 |
| commit | 568bfce07873fb07086ca239c0e321ef5d8088f1 (patch) | |
| tree | bf41ec01d950558ba0931be12668712de084c6cb /include/linux/skmsg.h | |
| parent | 422c9727b07f9f86e2ec11c56622e566221591cc (diff) | |
| parent | 5bc55a333a2f7316b58edc7573e8e893f7acb532 (diff) | |
| download | linux-568bfce07873fb07086ca239c0e321ef5d8088f1.tar.xz | |
Merge 6.13-rc7 into tty-next
We need the serial driver fixes in here to build on top of.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/skmsg.h')
| -rw-r--r-- | include/linux/skmsg.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h index d9b03e0746e7..2cbe0c22a32f 100644 --- a/include/linux/skmsg.h +++ b/include/linux/skmsg.h @@ -317,17 +317,22 @@ static inline void sock_drop(struct sock *sk, struct sk_buff *skb) kfree_skb(skb); } -static inline void sk_psock_queue_msg(struct sk_psock *psock, +static inline bool sk_psock_queue_msg(struct sk_psock *psock, struct sk_msg *msg) { + bool ret; + spin_lock_bh(&psock->ingress_lock); - if (sk_psock_test_state(psock, SK_PSOCK_TX_ENABLED)) + if (sk_psock_test_state(psock, SK_PSOCK_TX_ENABLED)) { list_add_tail(&msg->list, &psock->ingress_msg); - else { + ret = true; + } else { sk_msg_free(psock->sk, msg); kfree(msg); + ret = false; } spin_unlock_bh(&psock->ingress_lock); + return ret; } static inline struct sk_msg *sk_psock_dequeue_msg(struct sk_psock *psock) |
