From: Liu Bo <bo.li.liu@oracle.com>
To: dsterba@suse.cz, Nikolay Borisov <nborisov@suse.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Remove pair of bio_get/put in btrfs_schedule_bio
Date: Tue, 12 Dec 2017 14:09:45 -0800 [thread overview]
Message-ID: <20171212220944.GA19371@lim.localdomain> (raw)
In-Reply-To: <20171212185238.GR3553@twin.jikos.cz>
On Tue, Dec 12, 2017 at 07:52:38PM +0100, David Sterba wrote:
> On Mon, Dec 11, 2017 at 02:57:56PM -0800, Liu Bo wrote:
> > On Mon, Dec 11, 2017 at 04:38:48PM +0200, Nikolay Borisov wrote:
> > > This code was added in 492bb6deee34 ("Btrfs: Hold a reference on bios
> > > during submit_bio, add some extra bio checks"). However, holding a
> > > reference on a bio is necessary only if it's going to be referenced
> > > after the submit_bio returns and the bio is completed. In this
> > > particular instance this is not the case so there is no need to hold
> > > an extra reference since we directly return.
> > >
> >
> > Looks good. If possible, please also drop other unnecessary bio_get()
> > in btrfs.
>
> You mean everywhere with similar context like in this patch?
>
Right, there're several places where bio_get() is put before running
functions but bio_put() is also put immediately without referencing
bio.
thanks,
-liubo
next prev parent reply other threads:[~2017-12-12 22:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-11 14:38 [PATCH] btrfs: Remove pair of bio_get/put in btrfs_schedule_bio Nikolay Borisov
2017-12-11 22:57 ` Liu Bo
2017-12-12 18:52 ` David Sterba
2017-12-12 22:09 ` Liu Bo [this message]
2017-12-13 7:18 ` Nikolay Borisov
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=20171212220944.GA19371@lim.localdomain \
--to=bo.li.liu@oracle.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
/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