From ee4c75c8b790001cb05d85a44b2a894a91f4ba05 Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Mon, 8 Oct 2012 16:16:58 +0200 Subject: [PATCH] dev-cache: Make dev_iter_create work with a NULL filter. --- lib/device/dev-cache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c index 79b302854..44a9e27f2 100644 --- a/lib/device/dev-cache.c +++ b/lib/device/dev-cache.c @@ -971,8 +971,12 @@ struct dev_iter *dev_iter_create(struct dev_filter *f, int dev_scan) if (dev_scan && !trust_cache()) { /* Flag gets reset between each command */ - if (!full_scan_done() && f && f->wipe) - f->wipe(f); /* Calls _full_scan(1) */ + if (!full_scan_done()) { + if (f && f->wipe) + f->wipe(f); /* Calls _full_scan(1) */ + else + _full_scan(1); + } } else _full_scan(0);