Skip to content
Commit 5c72feee authored by Jan Kara's avatar Jan Kara Committed by Linus Torvalds
Browse files

mm/filemap.c: don't bother dropping mmap_sem for zero size readahead



When handling a page fault, we drop mmap_sem to start async readahead so
that we don't block on IO submission with mmap_sem held.  However there's
no point to drop mmap_sem in case readahead is disabled.  Handle that case
to avoid pointless dropping of mmap_sem and retrying the fault.  This was
actually reported to block mlockall(MCL_CURRENT) indefinitely.

Fixes: 6b4c9f44 ("filemap: drop the mmap_sem for all blocking operations")
Reported-by: default avatarMinchan Kim <minchan@kernel.org>
Reported-by: default avatarRobert Stupp <snazy@gmx.de>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarMinchan Kim <minchan@kernel.org>
Link: http://lkml.kernel.org/r/20200212101356.30759-1-jack@suse.cz


Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5f2d5026
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment