linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] do_generic_file_read(): Fail immediately if killed
@ 2016-08-17  0:00 Bart Van Assche
  2016-08-17 10:01 ` Jan Kara
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Bart Van Assche @ 2016-08-17  0:00 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mel Gorman, Jan Kara, Hugh Dickins, Oleg Nesterov,
	linux-mm@kvack.org, Linux-fsdevel

If a fatal signal has been received, fail immediately instead of
trying to read more data.

See also commit ebded02788b5 ("mm: filemap: avoid unnecessary
calls to lock_page when waiting for IO to complete during a read")

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Jan Kara <jack@suse.cz>
Cc: Hugh Dickins <hughd@google.com>
Cc: Oleg Nesterov <oleg@redhat.com>
---
 mm/filemap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mm/filemap.c b/mm/filemap.c
index 2a9e84f6..bd8ab63 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1721,7 +1721,9 @@ find_page:
 			 * wait_on_page_locked is used to avoid unnecessarily
 			 * serialisations and why it's safe.
 			 */
-			wait_on_page_locked_killable(page);
+			error = wait_on_page_locked_killable(page);
+			if (unlikely(error))
+				goto readpage_error;
 			if (PageUptodate(page))
 				goto page_ok;
 
-- 
2.9.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-17 17:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-17  0:00 [PATCH] do_generic_file_read(): Fail immediately if killed Bart Van Assche
2016-08-17 10:01 ` Jan Kara
2016-08-17 16:23   ` Bart Van Assche
2016-08-17 13:48 ` Oleg Nesterov
2016-08-17 17:20 ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).