qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v3 2/2] block: Make bdrv_root_attach_child() unr


From: Alberto Garcia
Subject: Re: [Qemu-block] [PATCH v3 2/2] block: Make bdrv_root_attach_child() unref child_bs on failure
Date: Mon, 13 May 2019 17:52:56 +0200
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Mon 13 May 2019 04:31:16 PM CEST, Max Reitz wrote:
>> @@ -2569,10 +2582,6 @@ BdrvChild *bdrv_open_child(const char *filename,
>>      }
>>  
>>      c = bdrv_attach_child(parent, bs, bdref_key, child_role, errp);
>> -    if (!c) {
>> -        bdrv_unref(bs);
>> -        return NULL;
>> -    }
>>  
>>      return c;
>>  }
>
> (That could have been simplified even further. *shrug*)

Right, we can remove the 'c' variable altogether. Feel free to edit the
commit if you want.

Berto



reply via email to

[Prev in Thread] Current Thread [Next in Thread]