On Fri, Jul 12, 2024 at 07:14:54PM +0200, Martin Wilck wrote:
> The logic for returning DM_FLUSH_BUSY in remove_partmap() got
> accidentally reverted in commit 20aeeb6. Fix it.
> 
> Fixes: 20aeeb6 ("libmultipath: fix deferred_remove function arguments")
Oops.
> 
Reviewed-by: Benjamin Marzinski <[email protected]>
> Signed-off-by: Martin Wilck <[email protected]>
> ---
>  libmultipath/devmapper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
> index b52b10e..5749d63 100644
> --- a/libmultipath/devmapper.c
> +++ b/libmultipath/devmapper.c
> @@ -1383,7 +1383,7 @@ remove_partmap(const char *name, void *data)
>  
>       if (dm_get_opencount(name)) {
>               dm_remove_partmaps(name, rd->flags);
> -             if ((rd->flags & DMFL_DEFERRED) && dm_get_opencount(name)) {
> +             if (!(rd->flags & DMFL_DEFERRED) && dm_get_opencount(name)) {
>                       condlog(2, "%s: map in use", name);
>                       return DM_FLUSH_BUSY;
>               }
> -- 
> 2.45.2


Reply via email to