mm: allow read-ahead with IOCB_NOWAIT set
authorJens Axboe <axboe@kernel.dk>
Fri, 22 May 2020 14:59:42 +0000 (08:59 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 22 Jun 2020 02:44:25 +0000 (20:44 -0600)
The read-ahead shouldn't block, so allow it to be done even if
IOCB_NOWAIT is set in the kiocb.

Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
mm/filemap.c

index f0ae9a6..3378d4f 100644 (file)
@@ -2028,8 +2028,6 @@ find_page:
 
                page = find_get_page(mapping, index);
                if (!page) {
-                       if (iocb->ki_flags & IOCB_NOWAIT)
-                               goto would_block;
                        page_cache_sync_readahead(mapping,
                                        ra, filp,
                                        index, last_index - index);