firewire: cdev: wake up client from queue_event() only when any event is available

The in_shutdown member of client structure is set only when releasing
file descriptor, thus no need to wake up the client itself.

Link: https://lore.kernel.org/r/20260927034343.28076-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
This commit is contained in:
Takashi Sakamoto 2026-09-27 12:43:41 +09:00
parent b362e6dd5c
commit 0f636cfe8d

View File

@ -338,13 +338,14 @@ static void queue_event(struct client *client, struct event *event,
event->v[1].size = size1;
scoped_guard(spinlock_irqsave, &client->lock) {
if (client->in_shutdown)
if (client->in_shutdown) {
kfree(event);
else
} else {
list_add_tail(&event->link, &client->event_list);
}
wake_up_interruptible(&client->wait);
wake_up_interruptible(&client->wait);
}
}
}
static int dequeue_event(struct client *client,