Skip to content

Commit

Permalink
mm: allow read-ahead with IOCB_NOWAIT set
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Jun 22, 2020
1 parent b63534c commit 2e85abf
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2028,8 +2028,6 @@ ssize_t generic_file_buffered_read(struct kiocb *iocb,

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);
Expand Down

0 comments on commit 2e85abf

Please sign in to comment.