mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
nvme: add context annotations for nvme_ctrl::ana_lock
nvme_parse_ana_log() accesses ANA state protected by ctrl->ana_lock and therefore requires callers to hold the lock. Annotate nvme_parse_ana_log() with __must_hold(&ctrl->ana_lock) so that Clang's lock context analysis can verify the locking requirement at compile time. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
d1fdf49b5f
commit
ca0058e8b5
|
|
@ -832,6 +832,7 @@ static void nvme_mpath_set_live(struct nvme_ns *ns)
|
|||
static int nvme_parse_ana_log(struct nvme_ctrl *ctrl, void *data,
|
||||
int (*cb)(struct nvme_ctrl *ctrl, struct nvme_ana_group_desc *,
|
||||
void *))
|
||||
__must_hold(&ctrl->ana_lock)
|
||||
{
|
||||
void *base = ctrl->ana_log_buf;
|
||||
size_t offset = sizeof(struct nvme_ana_rsp_hdr);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user