diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2025-09-16 08:47:47 +0900 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2025-09-16 08:52:19 +0900 |
commit | e0cda0dd12e08ecb8d26b8d78dc63e67e7069510 (patch) | |
tree | 765dc1ba61cc3b761ebc767119e0e45456313789 | |
parent | b5725cfa4120a4d234ab112aad151d731531d093 (diff) |
firewire: core: annotate fw_destroy_nodes with must-hold-lock
The function, fw_destroy_nodes(), is used widely within firewire-core
module. It has a prerequisite condition that struct fw_card.lock must
be hold in advance.
This commit adds annotation for it.
Link: https://lore.kernel.org/r/20250915234747.915922-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | drivers/firewire/core-topology.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c index c62cf93f3f65..8fa0772ee723 100644 --- a/drivers/firewire/core-topology.c +++ b/drivers/firewire/core-topology.c @@ -325,9 +325,11 @@ static void report_found_node(struct fw_card *card, card->bm_retries = 0; } -/* Must be called with card->lock held */ void fw_destroy_nodes(struct fw_card *card) +__must_hold(&card->lock) { + lockdep_assert_held(&card->lock); + card->color++; if (card->local_node != NULL) for_each_fw_node(card, card->local_node, report_lost_node); |