linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Coly Li <i@coly.li>
Cc: Christoph Hellwig <hch@infradead.org>,
	bcache@lists.ewheeler.net, linux-block@vger.kernel.org,
	linux-bcache@vger.kernel.org, axboe@kernel.dk,
	Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 01/19] bcache: Fix leak of bdev reference
Date: Mon, 4 Sep 2017 23:43:48 -0700	[thread overview]
Message-ID: <20170905064348.GA23716@infradead.org> (raw)
In-Reply-To: <e9019647-62b5-1c14-8b2f-66528b972b5c@coly.li>

On Tue, Sep 05, 2017 at 01:30:04AM +0800, Coly Li wrote:
> 
> When you mentioned "whole chunk of code", do you mean the following
> block of code ?
> 
> 
> 1960         if (IS_ERR(bdev)) {
> ========= start of whole chunk of code ============
> 1961                 if (bdev == ERR_PTR(-EBUSY)) {
> 1962                         bdev = lookup_bdev(strim(path));
> 1963                         mutex_lock(&bch_register_lock);
> 1964                         if (!IS_ERR(bdev) && bch_is_open(bdev))
> 1965                                 err = "device already registered";
> 1966                         else
> 1967                                 err = "device busy";
> 1968                         mutex_unlock(&bch_register_lock);
> 1969                         if (!IS_ERR(bdev))
> 1970                                 bdput(bdev);
> 1971                         if (attr == &ksysfs_register_quiet)
> 1972                                 goto out;
> 1973                 }
> ========= end of whole chunk of code ============
> 1974                 goto err;
> 1975         }
> 
> I don't mind to remove it, just double check I don't misunderstand what
> you meant.

Yes, that's the problematic block.

  reply	other threads:[~2017-09-05  6:43 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LRH.2.11.1705251853530.19359@mail.ewheeler.net>
2017-06-28 23:06 ` [PULL] bcache fixes and updates for-4.13 Eric Wheeler
2017-06-29 13:45   ` Christoph Hellwig
2016-10-11 19:04     ` [PATCH 07/19] bcache: introduce bcache sysfs entries for ioprio-based bypass/writeback hints Eric Wheeler
2016-10-11 19:04     ` Eric Wheeler
2016-10-11 19:08     ` [PATCH 08/19] bcache: documentation for sysfs entries describing bcache cache hinting Eric Wheeler
2016-10-11 19:08     ` Eric Wheeler
2016-10-20  0:36     ` [PATCH 09/19] bcache: update bio->bi_opf bypass/writeback REQ_ flag hints Eric Wheeler
2016-10-20  0:36     ` Eric Wheeler
2017-05-09 19:03     ` [PATCH 01/19] bcache: Fix leak of bdev reference Jan Kara
2017-05-09 19:03     ` Jan Kara
2017-05-09 19:05     ` [PATCH 02/19] bcache: fix sequential large write IO bypass Tang Junhui
2017-05-09 19:05     ` Tang Junhui
2017-05-09 19:07     ` [PATCH 03/19] bcache: do not subtract sectors_to_gc for bypassed IO Tang Junhui
2017-05-09 19:07     ` Tang Junhui
2017-05-09 19:14     ` [PATCH 05/19] bcache: fix calling ida_simple_remove() with incorrect minor Tang Junhui
2017-05-09 19:14     ` Tang Junhui
2017-06-01  8:48     ` [PATCH 10/19] bcache: initialize stripe_sectors_dirty correctly for thin flash device Tang Junhui
2017-06-01  8:48     ` Tang Junhui
2017-06-12 21:18     ` [PATCH 14/19] bcache: Correct return value for sysfs attach errors Tony Asleson
2017-06-12 21:18     ` Tony Asleson
2017-06-28  0:30     ` [PATCH 13/19] bcache: delete redundant calling set_gc_sectors() Tang Junhui
2017-06-28  0:30     ` Tang Junhui
2017-06-28  0:37     ` [PATCH 16/19] bcache: increase the number of open buckets Tang Junhui
2017-06-28  0:37     ` Tang Junhui
2017-06-28  0:41     ` [PATCH 17/19] bcache: fix for gc and write-back race Tang Junhui
2017-06-28  0:41     ` Tang Junhui
2017-06-28 11:47     ` [PATCH 18/19] bcache: silence static checker warning Dan Carpenter
2017-06-28 11:47     ` Dan Carpenter
2017-06-28 11:48     ` [PATCH 19/19] bcache: Update continue_at() documentation Dan Carpenter
2017-06-28 11:48     ` Dan Carpenter
2017-06-29 16:19     ` [PULL] bcache fixes and updates for-4.13 Coly Li
2017-06-29 22:12     ` Eric Wheeler
2017-06-29 22:25       ` Eric Wheeler
2017-06-29 23:28         ` Nick Alcock
2017-06-30 20:42     ` [PATCH 01/19] bcache: Fix leak of bdev reference bcache
2017-06-30 20:42       ` [PATCH 02/19] bcache: fix sequential large write IO bypass bcache
2017-07-05 18:25         ` Christoph Hellwig
2017-06-30 20:42       ` [PATCH 03/19] bcache: do not subtract sectors_to_gc for bypassed IO bcache
2017-07-01 17:26         ` Coly Li
2017-07-05 18:25         ` Christoph Hellwig
2017-06-30 20:42       ` [PATCH 05/19] bcache: fix calling ida_simple_remove() with incorrect minor bcache
2017-07-05 18:26         ` Christoph Hellwig
2017-07-06  6:21           ` tang.junhui
2017-06-30 20:42       ` [PATCH 06/19] bcache: explicitly destory mutex while exiting bcache
2017-07-01 18:43         ` Coly Li
2017-07-05 11:58           ` Liang Chen
2017-07-11  7:22             ` Coly Li
2017-07-05 18:27         ` Christoph Hellwig
2017-07-06  1:56           ` Liang Chen
2017-06-30 20:42       ` [PATCH 07/19] bcache: introduce bcache sysfs entries for ioprio-based bypass/writeback hints bcache
2017-07-05 18:47         ` Christoph Hellwig
2017-07-05 21:49           ` Eric Wheeler
2017-06-30 20:42       ` [PATCH 08/19] bcache: documentation for sysfs entries describing bcache cache hinting bcache
2017-07-05 18:27         ` Christoph Hellwig
2017-06-30 20:42       ` [PATCH 09/19] bcache: update bio->bi_opf bypass/writeback REQ_ flag hints bcache
2017-07-01 18:49         ` Coly Li
2017-07-01 19:39           ` Eric Wheeler
2017-07-02  6:51             ` Coly Li
2017-07-03 22:51               ` [PATCH 09/19 v2] " bcache
2017-07-04  4:08                 ` Coly Li
2017-07-05 18:48                 ` Christoph Hellwig
2017-07-06  7:35                   ` Coly Li
2017-07-06 15:24                     ` Christoph Hellwig
2017-07-11  3:48                       ` Coly Li
2017-07-12  9:18                         ` Coly Li
2017-06-30 20:42       ` [PATCH 10/19] bcache: initialize stripe_sectors_dirty correctly for thin flash device bcache
2017-07-01 18:52         ` Coly Li
2017-07-13  4:10           ` Eric Wheeler
2017-06-30 20:43       ` [PATCH 13/19] bcache: delete redundant calling set_gc_sectors() bcache
2017-07-13  3:41         ` Eric Wheeler
2017-06-30 20:43       ` [PATCH 14/19] bcache: Correct return value for sysfs attach errors bcache
2017-06-30 20:43       ` [PATCH 16/19] bcache: increase the number of open buckets bcache
2017-07-13  9:56         ` Coly Li
2017-06-30 20:43       ` [PATCH 17/19] bcache: fix for gc and write-back race bcache
2017-08-03 16:20         ` Coly Li
2017-06-30 20:43       ` [PATCH 18/19] bcache: silence static checker warning bcache
2017-07-13  9:44         ` Coly Li
2017-06-30 20:43       ` [PATCH 19/19] bcache: Update continue_at() documentation bcache
2017-07-05 18:48         ` Christoph Hellwig
2017-07-08 18:12         ` Coly Li
2017-07-01 16:55       ` [PATCH 01/19] bcache: Fix leak of bdev reference Coly Li
2017-07-05 18:24       ` Christoph Hellwig
2017-09-04 17:30         ` Coly Li
2017-09-05  6:43           ` Christoph Hellwig [this message]
2017-09-05  6:55             ` Coly Li
2017-09-06  5:25             ` Coly Li
     [not found]       ` <1498855388-16990-15-git-send-email-bcache@lists.ewheeler.net>
     [not found]         ` <a0e50d65-6e9d-23d0-d73c-8fb2b3dfcc51@coly.li>
     [not found]           ` <alpine.LRH.2.11.1710271906110.24585@mail.ewheeler.net>
     [not found]             ` <alpine.LRH.2.11.1710271908450.24585@mail.ewheeler.net>
2017-10-28  8:58               ` [PATCH 15/19] bcache: fix issue of writeback rate at minimum 1 key per second Coly Li

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=20170905064348.GA23716@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=bcache@lists.ewheeler.net \
    --cc=i@coly.li \
    --cc=jack@suse.cz \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    /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).