From: Dominique Martinet <asmadeus@codewreck.org>
To: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Cc: Eric Van Hensbergen <ericvh@gmail.com>,
Latchesar Ionkov <lucho@ionkov.net>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
v9fs-developer@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: 9p: free what was emitted when read count is 0
Date: Tue, 2 Mar 2021 17:08:13 +0900 [thread overview]
Message-ID: <YD3ybcx1i8Rtbvkp@codewreck.org> (raw)
In-Reply-To: <20210302153940.64332d11@xhacker.debian>
Jisheng Zhang wrote on Tue, Mar 02, 2021 at 03:39:40PM +0800:
> > Rather than make an exception for 0, how about just removing the if as
> > follow ?
>
> IMHO, we may need to keep the "if" in current logic. When count
> reaches zero, we need to break the "while(iov_iter_count(to))" loop, so removing
> the "if" modifying the logic.
We're not looking at the same loop, the break will happen properly
without the if because it's the return value of p9_client_read_once()
now.
In the old code I remember what you're saying and it makes sense, I
guess that was the reason for the special case.
It's not longer required, let's remove it.
--
Dominique
next prev parent reply other threads:[~2021-03-02 8:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 2:33 [PATCH] net: 9p: free what was emitted when read count is 0 Jisheng Zhang
2021-03-01 2:51 ` Dominique Martinet
2021-03-01 3:01 ` Jisheng Zhang
2021-03-02 4:38 ` Dominique Martinet
2021-03-02 7:39 ` Jisheng Zhang
2021-03-02 8:08 ` Dominique Martinet [this message]
2021-03-02 9:22 ` Jisheng Zhang
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=YD3ybcx1i8Rtbvkp@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=Jisheng.Zhang@synaptics.com \
--cc=davem@davemloft.net \
--cc=ericvh@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=netdev@vger.kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.