summaryrefslogtreecommitdiff
path: root/include/linux/skmsg.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2025-01-10 14:24:17 +1000
committerDave Airlie <airlied@redhat.com>2025-01-10 14:24:17 +1000
commitf6001870edeabf0f7bc0460303d0cdbb9f0b3bc4 (patch)
treeacda60340b486b9893d96b864617f66286a4c3c6 /include/linux/skmsg.h
parent6ec692d6a5f3ab916133e2c25fa9925862210de0 (diff)
parent9d89551994a430b50c4fffcb1e617a057fa76e20 (diff)
Merge tag 'v6.13-rc6' into drm-next
This backmerges Linux 6.13-rc6 this is need for the newer pulls. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/linux/skmsg.h')
-rw-r--r--include/linux/skmsg.h11
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)