Changeset 583c2a3 in mainline for kernel/generic/src/mm/slab.c


Ignore:
Timestamp:
2020-07-06T22:58:19Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
37d4c91, ee2f0beb
Parents:
762f989
Message:

Avoid most cases of direct used of list_t.prev/next in kernel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/slab.c

    r762f989 r583c2a3  
    837837                irq_spinlock_lock(&slab_cache_lock, true);
    838838
    839                 link_t *cur = slab_cache_list.head.next;
     839                link_t *cur = list_first(&slab_cache_list);
    840840                size_t i = 0;
    841                 while (i < skip && cur != &slab_cache_list.head) {
     841                while (i < skip && cur != NULL) {
    842842                        i++;
    843                         cur = cur->next;
     843                        cur = list_next(cur, &slab_cache_list);
    844844                }
    845845
    846                 if (cur == &slab_cache_list.head) {
     846                if (cur == NULL) {
    847847                        irq_spinlock_unlock(&slab_cache_lock, true);
    848848                        break;
Note: See TracChangeset for help on using the changeset viewer.