diff options
| author | Miquel Raynal <miquel.raynal@bootlin.com> | 2026-06-21 17:05:45 +0200 |
|---|---|---|
| committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2026-06-21 17:05:45 +0200 |
| commit | 49420dfdedd676befaa999b165a76d8d7eec4fab (patch) | |
| tree | eafef38246f234752ad47e4ff7fb7d55fe6e95eb /include/linux/rculist.h | |
| parent | c10f641fcb04a33da0b6bfc59cdadc250aafeb96 (diff) | |
| parent | 4f2692a5383e4bdd43ae940cda012360f7217a2d (diff) | |
Merge tag 'nand/for-7.2' into mtd/next
* Extend SPI NAND continuous read to Winbond devices, which requires
numerous changes in the spi-{mem,nand} layers such as the need for a
secondary read operation template.
* Continuous reads in general have also been enhanced/fixed for avoiding
potential issues at probe time and at block boundaries.
Plus, there is the usual load of misc fixes and improvements.
Diffstat (limited to 'include/linux/rculist.h')
| -rw-r--r-- | include/linux/rculist.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 2abba7552605..e3bc44225692 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h @@ -261,6 +261,35 @@ static inline void list_replace_rcu(struct list_head *old, old->prev = LIST_POISON2; } +static inline void __list_splice_rcu(struct list_head *list, + struct list_head *prev, + struct list_head *next) +{ + struct list_head *first = list->next; + struct list_head *last = list->prev; + + last->next = next; + first->prev = prev; + next->prev = last; + rcu_assign_pointer(list_next_rcu(prev), first); +} + +/** + * list_splice_rcu - splice a non-RCU list into an RCU-protected list, + * designed for stacks. + * @list: the non RCU-protected list to splice + * @head: the place in the existing RCU-protected list to splice + * + * The list pointed to by @head can be RCU-read traversed concurrently with + * this function. + */ +static inline void list_splice_rcu(struct list_head *list, + struct list_head *head) +{ + if (!list_empty(list)) + __list_splice_rcu(list, head, head->next); +} + /** * __list_splice_init_rcu - join an RCU-protected list into an existing list. * @list: the RCU-protected list to splice |
