mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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:
parent
b362e6dd5c
commit
0f636cfe8d
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user