Re: [PATCH 01/19] bcache: Fix leak of bdev reference

2017-09-05 Thread Coly Li
On 2017/9/5 下午2:43, Christoph Hellwig wrote: > 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 >>

Re: [PATCH 01/19] bcache: Fix leak of bdev reference

2017-09-05 Thread Coly Li
On 2017/9/5 下午2:43, Christoph Hellwig wrote: > 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 >>

Re: [PATCH 01/19] bcache: Fix leak of bdev reference

2017-09-05 Thread Christoph Hellwig
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)) { >

Re: [PATCH 01/19] bcache: Fix leak of bdev reference

2017-07-01 Thread Coly Li
On 2017/7/1 上午4:42, bca...@lists.ewheeler.net wrote: > From: Jan Kara > > If blkdev_get_by_path() in register_bcache() fails, we try to lookup the > block device using lookup_bdev() to detect which situation we are in to > properly report error. However we never drop the reference

[PATCH 01/19] bcache: Fix leak of bdev reference

2017-06-30 Thread bcache
From: Jan Kara If blkdev_get_by_path() in register_bcache() fails, we try to lookup the block device using lookup_bdev() to detect which situation we are in to properly report error. However we never drop the reference returned to us from lookup_bdev(). Fix that. Signed-off-by:

[PATCH 01/19] bcache: Fix leak of bdev reference

2017-06-30 Thread Jan Kara
If blkdev_get_by_path() in register_bcache() fails, we try to lookup the block device using lookup_bdev() to detect which situation we are in to properly report error. However we never drop the reference returned to us from lookup_bdev(). Fix that. Signed-off-by: Jan Kara Cc:

[PATCH 01/19] bcache: Fix leak of bdev reference

2017-06-30 Thread Jan Kara
If blkdev_get_by_path() in register_bcache() fails, we try to lookup the block device using lookup_bdev() to detect which situation we are in to properly report error. However we never drop the reference returned to us from lookup_bdev(). Fix that. Signed-off-by: Jan Kara Cc: