Skip to content

Commit ac1b245

Browse files
Mikulas Patockagregkh
authored andcommitted
dm: don't report warning when doing deferred remove
commit b7cce3e upstream. 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 <mpatocka@redhat.com> Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Cc: stable@vger.kernel.org Fixes: 2c140a2 ("dm: allow remove to be deferred") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 323d252 commit ac1b245

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/md/dm-ioctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static void dm_hash_remove_all(bool keep_open_devices, bool mark_deferred, bool
384384

385385
up_write(&_hash_lock);
386386

387-
if (dev_skipped)
387+
if (dev_skipped && !only_deferred)
388388
DMWARN("remove_all left %d open device(s)", dev_skipped);
389389
}
390390

0 commit comments

Comments
 (0)