summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/list.h9
-rw-r--r--include/linux/nvme.h4
2 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index 09d979976b3b..19212bfc3f6d 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -34,6 +34,14 @@
struct list_head name = LIST_HEAD_INIT(name)
/**
+ * LIST_HEAD_GUARDED - define a &struct list_head annotated with __guarded_by()
+ * @name: name of the list_head
+ * @lock: lock protecting the list
+ */
+#define LIST_HEAD_GUARDED(name, lock) \
+ __guarded_by(&(lock)) LIST_HEAD(name)
+
+/**
* INIT_LIST_HEAD - Initialize a list_head structure
* @list: list_head structure to be initialized.
*
@@ -436,6 +444,7 @@ static inline void list_del_init_careful(struct list_head *entry)
* if another CPU could re-list_add() it.
*/
static inline int list_empty_careful(const struct list_head *head)
+ __context_unsafe(/* intentional lockless access to @head */)
{
struct list_head *next = smp_load_acquire(&head->next);
return list_is_head(next, head) && (next == READ_ONCE(head->prev));
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 041f30931a90..91ce434a7e8d 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -2272,14 +2272,14 @@ struct nvme_completion {
#define NVME_TERTIARY(ver) ((ver) & 0xff)
enum {
- NVME_AEN_RESV_LOG_PAGE_AVALIABLE = 0x00,
+ NVME_AEN_RESV_LOG_PAGE_AVAILABLE = 0x00,
};
enum {
NVME_PR_LOG_EMPTY_LOG_PAGE = 0x00,
NVME_PR_LOG_REGISTRATION_PREEMPTED = 0x01,
NVME_PR_LOG_RESERVATION_RELEASED = 0x02,
- NVME_PR_LOG_RESERVATOIN_PREEMPTED = 0x03,
+ NVME_PR_LOG_RESERVATION_PREEMPTED = 0x03,
};
enum {