lkml.org 
[lkml]   [2020]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 10/10] block: put_device() if device_add() fails
From
Date
On 2020-04-24 15:32, Luis Chamberlain wrote:
> On Sun, Apr 19, 2020 at 04:40:45PM -0700, Bart Van Assche wrote:
>> On 4/19/20 12:45 PM, Luis Chamberlain wrote:
>>> Through code inspection I've found that we don't put_device() if
>>> device_add() fails, and this must be done to decrement its refcount.
>>
>> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
>
> Turns out this is wrong, as bdi needs it still, we have can only remove
> it once all users are done, which should be at the disk_release() path.
>
> I've found this while adding the errors paths missing.

Hi Luis,

I had a look at the comments above device_add() before I added my
Reviewed-by. Now that I've had another look at these comments and also
at the device_add() implementation I agree that we don't need this patch.

Bart.

\
 
 \ /
  Last update: 2020-04-25 03:58    [W:0.554 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site