mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
do_generic_file_read(): fail immediately if killed
If a fatal signal has been received, fail immediately instead of trying
to read more data.
If wait_on_page_locked_killable() was interrupted then this page is most
likely is not PageUptodate() and in this case do_generic_file_read()
will fail after lock_page_killable().
See also commit ebded02788 ("mm: filemap: avoid unnecessary calls to
lock_page when waiting for IO to complete during a read")
[[email protected]: changelog addition]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Bart Van Assche <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Acked-by: Oleg Nesterov <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
9300d8dfd2
commit
c4b209a426
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue