diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/list_bl.h | 5 | ||||
| -rw-r--r-- | include/linux/rculist_bl.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h index 9ee97e7f2be4..b2adbb4b2f73 100644 --- a/include/linux/list_bl.h +++ b/include/linux/list_bl.h | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | * some fast and compact auxiliary data. | 16 | * some fast and compact auxiliary data. |
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 19 | #if defined(CONFIG_SMP) |
| 20 | #define LIST_BL_LOCKMASK 1UL | 20 | #define LIST_BL_LOCKMASK 1UL |
| 21 | #else | 21 | #else |
| 22 | #define LIST_BL_LOCKMASK 0UL | 22 | #define LIST_BL_LOCKMASK 0UL |
| @@ -62,7 +62,8 @@ static inline void hlist_bl_set_first(struct hlist_bl_head *h, | |||
| 62 | struct hlist_bl_node *n) | 62 | struct hlist_bl_node *n) |
| 63 | { | 63 | { |
| 64 | LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); | 64 | LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); |
| 65 | LIST_BL_BUG_ON(!((unsigned long)h->first & LIST_BL_LOCKMASK)); | 65 | LIST_BL_BUG_ON(((unsigned long)h->first & LIST_BL_LOCKMASK) != |
| 66 | LIST_BL_LOCKMASK); | ||
| 66 | h->first = (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK); | 67 | h->first = (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK); |
| 67 | } | 68 | } |
| 68 | 69 | ||
diff --git a/include/linux/rculist_bl.h b/include/linux/rculist_bl.h index b872b493724d..cf1244fbf3b6 100644 --- a/include/linux/rculist_bl.h +++ b/include/linux/rculist_bl.h | |||
| @@ -11,7 +11,8 @@ static inline void hlist_bl_set_first_rcu(struct hlist_bl_head *h, | |||
| 11 | struct hlist_bl_node *n) | 11 | struct hlist_bl_node *n) |
| 12 | { | 12 | { |
| 13 | LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); | 13 | LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); |
| 14 | LIST_BL_BUG_ON(!((unsigned long)h->first & LIST_BL_LOCKMASK)); | 14 | LIST_BL_BUG_ON(((unsigned long)h->first & LIST_BL_LOCKMASK) != |
| 15 | LIST_BL_LOCKMASK); | ||
| 15 | rcu_assign_pointer(h->first, | 16 | rcu_assign_pointer(h->first, |
| 16 | (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK)); | 17 | (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK)); |
| 17 | } | 18 | } |
