J Jeff Moyer #
Message details and related content
Hi, Christoph,
REQ_POLL is set but never checked. Is part of the patch missing, or was
that intentional?
-Jeff
Christoph Hellwig [off-list ref] writes:
quoted hunk
Signed-off-by: Christoph Hellwig <redacted> --- block/blk-core.c | 9 +++++++-- fs/direct-io.c | 4 ++++ include/linux/blk_types.h | 2 ++ include/linux/blkdev.h | 1 + 4 files changed, 14 insertions(+), 2 deletions(-)diff --git a/block/blk-core.c b/block/blk-core.c index b83d297..81b4b8b 100644 --- a/block/blk-core.c +++ b/block/blk-core.c@@ -3335,13 +3335,18 @@ void blk_finish_plug(struct blk_plug *plug) } EXPORT_SYMBOL(blk_finish_plug); +inline bool blk_queue_can_poll(struct request_queue *q) +{ + return q->mq_ops && q->mq_ops->poll && + test_bit(QUEUE_FLAG_POLL, &q->queue_flags); +} + bool blk_poll(struct request_queue *q, blk_qc_t cookie) { struct blk_plug *plug; long state; - if (!q->mq_ops || !q->mq_ops->poll || !blk_qc_t_valid(cookie) || - !test_bit(QUEUE_FLAG_POLL, &q->queue_flags)) + if (!blk_queue_can_poll(q) || !blk_qc_t_valid(cookie)) return false; plug = current->plug;diff --git a/fs/direct-io.c b/fs/direct-io.c index 0a8d937..ba5ba7e 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c@@ -1197,6 +1197,10 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, dio->inode = inode; dio->rw = iov_iter_rw(iter) == WRITE ? WRITE_ODIRECT : READ;