summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-10-02 14:38:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-10-02 14:38:10 -0700
commit702bfc891db162b99e880da78cc256dac14cfc7f (patch)
tree5c61da3e5b3d23455eacabe51e81cf612df357cd /mm
parentf016a5405234709938b38e965e02950e51084ac3 (diff)
parentc8d317aa1887b40b188ec3aaa6e9e524333caed1 (diff)
Merge tag 'io_uring-5.9-2020-10-02' of git://git.kernel.dk/linux-block
Pull io_uring fixes from Jens Axboe: - fix for async buffered reads if read-ahead is fully disabled (Hao) - double poll match fix - ->show_fdinfo() potential ABBA deadlock complaint fix * tag 'io_uring-5.9-2020-10-02' of git://git.kernel.dk/linux-block: io_uring: fix async buffered reads when readahead is disabled io_uring: fix potential ABBA deadlock in ->show_fdinfo() io_uring: always delete double poll wait entry on match
Diffstat (limited to 'mm')
-rw-r--r--mm/filemap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 5202e38ab79e..99c49eeae71b 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2365,7 +2365,11 @@ readpage:
}
if (!PageUptodate(page)) {
- error = lock_page_killable(page);
+ if (iocb->ki_flags & IOCB_WAITQ)
+ error = lock_page_async(page, iocb->ki_waitq);
+ else
+ error = lock_page_killable(page);
+
if (unlikely(error))
goto readpage_error;
if (!PageUptodate(page)) {