diff options
-rw-r--r-- | lib/blkid/cache.c | 4 | ||||
-rw-r--r-- | misc/blkid.8.in | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/blkid/cache.c b/lib/blkid/cache.c index 1508d0f8..efd4656e 100644 --- a/lib/blkid/cache.c +++ b/lib/blkid/cache.c @@ -154,13 +154,13 @@ void blkid_put_cache(blkid_cache cache) void blkid_gc_cache(blkid_cache cache) { - struct list_head *p; + struct list_head *p, *pnext; struct stat st; if (!cache) return; - list_for_each(p, &cache->bic_devs) { + list_for_each_safe(p, pnext, &cache->bic_devs) { blkid_dev dev = list_entry(p, struct blkid_struct_dev, bid_devs); if (!p) break; diff --git a/misc/blkid.8.in b/misc/blkid.8.in index 42ad0d71..8a4e9718 100644 --- a/misc/blkid.8.in +++ b/misc/blkid.8.in @@ -61,7 +61,8 @@ scanned but not necessarily available at this time), specify .IR /dev/null. .TP .B \-g -Perform a garbage collection pass on the blkid cache. +Perform a garbage collection pass on the blkid cache to remove +devices which no longer exist. .TP .B \-h Display a usage message and exit. |