From: Brian Gix Date: Thu, 31 Mar 2022 18:07:47 +0000 (-0700) Subject: Bluetooth: Keep MGMT pending queue ordered FIFO X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=31396dd53f32d5d82655d84ab31e193ace836688;p=linux.git Bluetooth: Keep MGMT pending queue ordered FIFO Small change to add new commands to tail of the list, and find/remove them from the head of the list. Signed-off-by: Brian Gix Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/mgmt_util.c b/net/bluetooth/mgmt_util.c index 37eef2ce55aec..b69cfed62088d 100644 --- a/net/bluetooth/mgmt_util.c +++ b/net/bluetooth/mgmt_util.c @@ -297,7 +297,7 @@ struct mgmt_pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode, if (!cmd) return NULL; - list_add(&cmd->list, &hdev->mgmt_pending); + list_add_tail(&cmd->list, &hdev->mgmt_pending); return cmd; }