All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND 1/3] bsg: fix bsg_poll() to return POLLOUT properly
@ 2011-06-17  2:17 Namhyung Kim
  2011-06-17  2:17 ` [PATCH RESEND 2/3] bsg: remove unnecessary conditional expressions Namhyung Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Namhyung Kim @ 2011-06-17  2:17 UTC (permalink / raw)
  To: James E.J. Bottomley; +Cc: FUJITA Tomonori, Jens Axboe, linux-scsi

POLLOUT should be returned only if bd->queued_cmds < bd->max_queue
so that bsg_alloc_command() can proceed.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Jens Axboe <jaxboe@fusionio.com>
---
 block/bsg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/bsg.c b/block/bsg.c
index 0c8b64a16484..c4f49e255751 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -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);
 
-- 
1.7.5.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-20 11:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-17  2:17 [PATCH RESEND 1/3] bsg: fix bsg_poll() to return POLLOUT properly Namhyung Kim
2011-06-17  2:17 ` [PATCH RESEND 2/3] bsg: remove unnecessary conditional expressions Namhyung Kim
2011-06-17  2:17 ` [PATCH RESEND 3/3] bsg: fix address space warning from sparse Namhyung Kim
2011-06-20 11:25 ` [PATCH RESEND 1/3] bsg: fix bsg_poll() to return POLLOUT properly Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.