public inbox for [email protected]
 help / color / mirror / Atom feed
From: Yejune Deng <[email protected]>
To: Pavel Begunkov <[email protected]>, [email protected]
Cc: [email protected], [email protected],
	[email protected], [email protected],
	Linux Kernel Mailing List <[email protected]>
Subject: Re: [PATCH] io_uring: remove io_remove_personalities()
Date: Thu, 24 Dec 2020 09:38:26 +0800	[thread overview]
Message-ID: <CABWKuGXfBxeQv7HpVz9J97x0deoSNxUaVRxCToX0C_FTSs=1QQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>

OK,I will adopt it and resubmit.

On Wed, Dec 23, 2020 at 8:45 PM Pavel Begunkov <[email protected]> wrote:
>
> On 23/12/2020 10:36, Stefano Garzarella wrote:
> > On Wed, Dec 23, 2020 at 11:27:05AM +0800, Yejune Deng wrote:
> >> The function io_remove_personalities() is very similar to
> >> io_unregister_personality(),but the latter has a more reasonable
> >> return value.
> >>
> >> Signed-off-by: Yejune Deng <[email protected]>
> >> ---
> >> fs/io_uring.c | 25 ++++++-------------------
> >> 1 file changed, 6 insertions(+), 19 deletions(-)
> >
> > The patch LGTM, maybe as an alternative you can leave io_remove_personality() with the interface needed by idr_for_each() and implement io_unregister_personality() calling io_remove_personality() with the right parameters.
>
> Right, don't replace sane types with void * just because.
> Leave well-typed io_unregister_personality() and call it from
> io_remove_personalities().
>
>
> Also
>  * idr_for_each() - Iterate through all stored pointers.
>  ...
>  * If @fn returns anything other than %0, the iteration stops and that
>  * value is returned from this function.
>
> For io_remove_personality() iod==NULL should not happen because
> it's under for_each and synchronised, but leave the return value be
>
> io_remove_personality(void *, ...)
> {
>         struct io_ring_ctx *ctx = data;
>
>         io_unregister_personality(ctx, id);
>         return 0;
> }
>
> --
> Pavel Begunkov

      reply	other threads:[~2020-12-24  1:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23  3:27 [PATCH] io_uring: remove io_remove_personalities() Yejune Deng
2020-12-23 10:36 ` Stefano Garzarella
2020-12-23 12:41   ` Pavel Begunkov
2020-12-24  1:38     ` Yejune Deng [this message]

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='CABWKuGXfBxeQv7HpVz9J97x0deoSNxUaVRxCToX0C_FTSs=1QQ@mail.gmail.com' \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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