mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
bsg: fix bsg_poll() to return POLLOUT properly
POLLOUT should be returned only if bd->queued_cmds < bd->max_queue so that bsg_alloc_command() can proceed. Signed-off-by: Namhyung Kim <[email protected]> Acked-by: FUJITA Tomonori <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
2c53b436a3
commit
80ceb05713
1 changed files with 1 additions and 1 deletions
|
|
@ -878,7 +878,7 @@ static unsigned int bsg_poll(struct file *file, poll_table *wait)
|
|||
spin_lock_irq(&bd->lock);
|
||||
if (!list_empty(&bd->done_list))
|
||||
mask |= POLLIN | POLLRDNORM;
|
||||
if (bd->queued_cmds >= bd->max_queue)
|
||||
if (bd->queued_cmds < bd->max_queue)
|
||||
mask |= POLLOUT;
|
||||
spin_unlock_irq(&bd->lock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue