From: Christoph Hellwig <hch@infradead.org>
To: chenxiang <chenxiang66@hisilicon.com>
Cc: bcrl@kvack.org, viro@zeniv.linux.org.uk, linux-aio@kvack.org,
linux-fsdevel@vger.kernel.org, linuxarm@huawei.com
Subject: Re: [PATCH] aio: Adjust the position of get_reqs_available() in aio_get_req()
Date: Thu, 20 Jan 2022 01:03:13 -0800 [thread overview]
Message-ID: <YeklUcOCM4W38siT@infradead.org> (raw)
In-Reply-To: <1642660946-60244-1-git-send-email-chenxiang66@hisilicon.com>
On Thu, Jan 20, 2022 at 02:42:26PM +0800, chenxiang wrote:
> From: Xiang Chen <chenxiang66@hisilicon.com>
>
> Right now allocating aio_kiocb is in front of get_reqs_available(),
> then need to free aio_kiocb if get_reqs_available() is failed.
> Put get_reqs_availabe() in front of allocating aio_kiocb to avoid
> freeing aio_kiocb if get_reqs_available() is failed.
Except for the fact that this completely missed undoing
get_reqs_available, how is that order any better?
next prev parent reply other threads:[~2022-01-20 9:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 6:42 [PATCH] aio: Adjust the position of get_reqs_available() in aio_get_req() chenxiang
2022-01-20 9:03 ` Christoph Hellwig [this message]
2022-01-20 11:33 ` chenxiang (M)
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=YeklUcOCM4W38siT@infradead.org \
--to=hch@infradead.org \
--cc=bcrl@kvack.org \
--cc=chenxiang66@hisilicon.com \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=viro@zeniv.linux.org.uk \
/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).