Skip to content
  • Kevin Wolf's avatar
    0d83708a
    block: Move recursion to bdrv_set_aio_context() · 0d83708a
    Kevin Wolf authored
    
    
    Instead of having two recursions, in bdrv_attach_aio_context() and in
    bdrv_detach_aio_context(), just having one recursion is enough. Said
    functions are only about a single node now.
    
    It is important that the recursion doesn't happen between detaching and
    attaching a context to the current node because the nested call will
    drain the node, and draining with a NULL context would segfault.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    0d83708a
    block: Move recursion to bdrv_set_aio_context()
    Kevin Wolf authored
    
    
    Instead of having two recursions, in bdrv_attach_aio_context() and in
    bdrv_detach_aio_context(), just having one recursion is enough. Said
    functions are only about a single node now.
    
    It is important that the recursion doesn't happen between detaching and
    attaching a context to the current node because the nested call will
    drain the node, and draining with a NULL context would segfault.
    
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
Loading