linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] bsg: fix bsg_poll() to return POLLOUT properly
@ 2011-05-15  5:31 Namhyung Kim
  2011-05-15  5:31 ` [PATCH 2/3] bsg: remove unnecessary conditional expressions Namhyung Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Namhyung Kim @ 2011-05-15  5:31 UTC (permalink / raw)
  To: FUJITA Tomonori, Jens Axboe; +Cc: linux-scsi, linux-kernel

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>
---
 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


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

end of thread, other threads:[~2011-05-18 19:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-15  5:31 [PATCH 1/3] bsg: fix bsg_poll() to return POLLOUT properly Namhyung Kim
2011-05-15  5:31 ` [PATCH 2/3] bsg: remove unnecessary conditional expressions Namhyung Kim
2011-05-15  5:31 ` [PATCH 3/3] bsg: fix address space warning from sparse Namhyung Kim
     [not found] ` <20110519.030933.1568838937885764850.fujita.tomonori@lab.ntt.co.jp@lab.ntt.co.jp>
2011-05-18 19:30   ` [PATCH 1/3] bsg: fix bsg_poll() to return POLLOUT properly Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).