From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Matthew Wilcox <matthew@wil.cx>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] Make wait_on_retry_sync_kiocb killable
Date: Thu, 25 Oct 2007 13:53:57 +1000 [thread overview]
Message-ID: <200710251353.57881.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <11927463623950-git-send-email-matthew@wil.cx>
On Friday 19 October 2007 08:26, Matthew Wilcox wrote:
> Use TASK_KILLABLE to allow wait_on_retry_sync_kiocb to return -EINTR.
> All callers then check the return value and break out of their loops.
>
> Signed-off-by: Matthew Wilcox <matthew@wil.cx>
> ---
> fs/read_write.c | 17 ++++++++++++-----
> 1 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/fs/read_write.c b/fs/read_write.c
> index 124693e..3196a3b 100644
> --- a/fs/read_write.c
> +++ b/fs/read_write.c
> @@ -218,14 +218,15 @@ Einval:
> return -EINVAL;
> }
>
> -static void wait_on_retry_sync_kiocb(struct kiocb *iocb)
> +static int wait_on_retry_sync_kiocb(struct kiocb *iocb)
> {
> - set_current_state(TASK_UNINTERRUPTIBLE);
> + set_current_state(TASK_KILLABLE);
> if (!kiocbIsKicked(iocb))
> schedule();
> else
> kiocbClearKicked(iocb);
> __set_current_state(TASK_RUNNING);
> + return fatal_signal_pending(current) ? -EINTR : 0;
Although the EINTR never gets to userspace anyway, is there a good
reason why the last patch for do_generic_mapping_read doesn't pass
back -EINTR?
next prev parent reply other threads:[~2007-10-25 4:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-18 22:25 [PATCH 0/5] TASK_KILLABLE Matthew Wilcox
2007-10-18 22:25 ` [PATCH 1/5] Use wake_up_locked() in eventpoll Matthew Wilcox
2007-10-19 3:56 ` Arjan van de Ven
2007-10-19 16:28 ` Matthew Wilcox
2007-10-18 22:25 ` [PATCH 2/5] Use macros instead of TASK_ flags Matthew Wilcox
2007-10-25 3:50 ` Nick Piggin
2007-10-18 22:26 ` [PATCH 3/5] Add TASK_WAKEKILL Matthew Wilcox
2007-10-18 22:26 ` [PATCH 4/5] Add lock_page_killable Matthew Wilcox
2007-10-18 22:26 ` [PATCH 5/5] Make wait_on_retry_sync_kiocb killable Matthew Wilcox
2007-10-25 3:53 ` Nick Piggin [this message]
2007-10-25 3:55 ` [PATCH 0/5] TASK_KILLABLE Nick Piggin
-- strict thread matches above, loose matches on Subject: below --
2007-10-24 12:24 [PATCH 1/5] Use wake_up_locked() in eventpoll Matthew Wilcox
2007-10-24 12:24 ` [PATCH 5/5] Make wait_on_retry_sync_kiocb killable Matthew Wilcox
2007-10-25 3:43 ` Andrew Morton
2007-10-25 18:31 ` Zach Brown
2007-09-02 2:43 [PATCH] TASK_KILLABLE version 2 Matthew Wilcox
2007-09-02 2:46 ` [PATCH 5/5] Make wait_on_retry_sync_kiocb killable Matthew Wilcox
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=200710251353.57881.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
/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
all inboxes | Powered by JetHome®