Message ID | 20240712171458.77611-47-mwilck@suse.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | christophe varoqui |
Headers | show |
Series | multipath-tools: devmapper API refactored | expand |
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 <bmarzins@redhat.com> > Signed-off-by: Martin Wilck <mwilck@suse.com> > --- > 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
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; }
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") Signed-off-by: Martin Wilck <mwilck@suse.com> --- libmultipath/devmapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)