From: Kemeng Shi <shikemeng@huaweicloud.com>
To: Bernd Schubert <bernd.schubert@fastmail.fm>,
miklos@szeredi.hu, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] fuse: move fuse_put_request a bit to remove forward declaration
Date: Tue, 12 Sep 2023 15:03:21 +0800 [thread overview]
Message-ID: <c06dc4c9-8f77-fb1e-cdb4-5ec397d2a345@huaweicloud.com> (raw)
In-Reply-To: <633750a9-bd94-df4b-0112-1e1e15a6b47b@fastmail.fm>
on 9/8/2023 6:55 AM, Bernd Schubert wrote:
>
>
> On 9/4/23 16:30, Kemeng Shi wrote:
>> Move fuse_put_request before fuse_get_req to remove forward declaration.
>>
>> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
>> ---
>> fs/fuse/dev.c | 42 ++++++++++++++++++++----------------------
>> 1 file changed, 20 insertions(+), 22 deletions(-)
>>
>> diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
>> index 4f49b1946635..deda8b036de7 100644
>> --- a/fs/fuse/dev.c
>> +++ b/fs/fuse/dev.c
>> @@ -101,7 +101,26 @@ static void fuse_drop_waiting(struct fuse_conn *fc)
>> }
>> }
>> -static void fuse_put_request(struct fuse_req *req);
>> +static void fuse_put_request(struct fuse_req *req)
>> +{
>> + struct fuse_conn *fc = req->fm->fc;
>> +
>> + if (refcount_dec_and_test(&req->count)) {
>> + if (test_bit(FR_BACKGROUND, &req->flags)) {
>> + /*
>> + * We get here in the unlikely case that a background
>> + * request was allocated but not sent
>> + */
>> + spin_lock(&fc->bg_lock);
>> + if (!fc->blocked)
>> + wake_up(&fc->blocked_waitq);
>> + spin_unlock(&fc->bg_lock);
>> + }
>> +
>> + fuse_drop_waiting(fc);
>> + fuse_request_free(req);
>> + }
>> +}
>> static struct fuse_req *fuse_get_req(struct fuse_mount *fm, bool for_background)
>> {
>> @@ -154,27 +173,6 @@ static struct fuse_req *fuse_get_req(struct fuse_mount *fm, bool for_background)
>> return ERR_PTR(err);
>> }
>> -static void fuse_put_request(struct fuse_req *req)
>> -{
>> - struct fuse_conn *fc = req->fm->fc;
>> -
>> - if (refcount_dec_and_test(&req->count)) {
>> - if (test_bit(FR_BACKGROUND, &req->flags)) {
>> - /*
>> - * We get here in the unlikely case that a background
>> - * request was allocated but not sent
>> - */
>> - spin_lock(&fc->bg_lock);
>> - if (!fc->blocked)
>> - wake_up(&fc->blocked_waitq);
>> - spin_unlock(&fc->bg_lock);
>> - }
>> -
>> - fuse_drop_waiting(fc);
>> - fuse_request_free(req);
>> - }
>> -}
>> -
>> unsigned int fuse_len_args(unsigned int numargs, struct fuse_arg *args)
>> {
>> unsigned nbytes = 0;
>
> Hmm yeah, but it makes it harder to get history with git annotate/blame?
>
Thanks for the feedbak, I will drop this and fix typo in patch 1 in next
version.
> Thanks,
> Bernd
>
prev parent reply other threads:[~2023-09-12 7:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 14:30 [PATCH 0/3] Minor cleanups to fuse Kemeng Shi
2023-09-04 14:30 ` [PATCH 1/3] fuse: move FR_WAITING set from fuse_request_queue_background to fuse_simple_background Kemeng Shi
2023-09-07 22:51 ` Bernd Schubert
2023-09-04 14:30 ` [PATCH 2/3] fuse: remove usage of FR_WATING flag Kemeng Shi
2023-09-07 22:53 ` Bernd Schubert
2023-09-04 14:30 ` [PATCH 3/3] fuse: move fuse_put_request a bit to remove forward declaration Kemeng Shi
2023-09-07 22:55 ` Bernd Schubert
2023-09-12 7:03 ` Kemeng Shi [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=c06dc4c9-8f77-fb1e-cdb4-5ec397d2a345@huaweicloud.com \
--to=shikemeng@huaweicloud.com \
--cc=bernd.schubert@fastmail.fm \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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®