From: Oleg Nesterov <oleg@redhat.com>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>, Jan Kara <jack@suse.cz>,
Hugh Dickins <hughd@google.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] do_generic_file_read(): Fail immediately if killed
Date: Wed, 17 Aug 2016 15:48:02 +0200 [thread overview]
Message-ID: <20160817134802.GA20161@redhat.com> (raw)
In-Reply-To: <63068e8e-8bee-b208-8441-a3c39a9d9eb6@sandisk.com>
On 08/16, Bart Van Assche wrote:
>
> If a fatal signal has been received, fail immediately instead of
> trying to read more data.
This looks a bit misleading to me.
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().
But as I already said, I belive the change itself is fine,
> --- 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;
Acked-by: Oleg Nesterov <oleg@redhat.com>
--
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>
next prev parent reply other threads:[~2016-08-17 13:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2016-08-17 17:20 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160817134802.GA20161@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bart.vanassche@sandisk.com \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).