git: bf7deecfe760 - main - linuxkpi: Add list_rotate_to_front

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Thu, 17 Feb 2022 08:43:19 UTC
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=bf7deecfe7604c394d0c89ca58ce5d22b0d5641c

commit bf7deecfe7604c394d0c89ca58ce5d22b0d5641c
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-02-11 15:10:08 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-02-17 08:30:46 +0000

    linuxkpi: Add list_rotate_to_front
    
    This just calls list_move_tail.
    
    Reviewed by:    hselasky, bz
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D34251
---
 sys/compat/linuxkpi/common/include/linux/list.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h
index eee1b56087e7..80ac57fecf6d 100644
--- a/sys/compat/linuxkpi/common/include/linux/list.h
+++ b/sys/compat/linuxkpi/common/include/linux/list.h
@@ -269,6 +269,13 @@ list_move_tail(struct list_head *entry, struct list_head *head)
 	list_add_tail(entry, head);
 }
 
+static inline void
+list_rotate_to_front(struct list_head *entry, struct list_head *head)
+{
+
+	list_move_tail(entry, head);
+}
+
 static inline void
 list_bulk_move_tail(struct list_head *head, struct list_head *first,
     struct list_head *last)