If dm_hash_remove_all was called from dm_deferred_remove, it would write
a warning "remove_all left %d open device(s)" if there are some other
devices active.

The warning is bogus, so let's disable it in this case.

Signed-off-by: Mikulas Patocka <[email protected]>
Reported-by: Zdenek Kabelac <[email protected]>
Cc: [email protected]
Fixes: 2c140a246dc0 ("dm: allow remove to be deferred")

---
 drivers/md/dm-ioctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/md/dm-ioctl.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-ioctl.c        2026-02-23 19:31:52.000000000 
+0100
+++ linux-2.6/drivers/md/dm-ioctl.c     2026-03-16 14:37:37.000000000 +0100
@@ -384,7 +384,7 @@ retry:
 
        up_write(&_hash_lock);
 
-       if (dev_skipped)
+       if (dev_skipped && !only_deferred)
                DMWARN("remove_all left %d open device(s)", dev_skipped);
 }
 


Reply via email to