No use walking empty hashtables when purging.
This commit is contained in:
parent
0f5d35d8d1
commit
5b49df17d8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: udf_subr.c,v 1.66 2008/07/22 19:06:55 reinoud Exp $ */
|
||||
/* $NetBSD: udf_subr.c,v 1.67 2008/07/22 21:39:08 reinoud Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006, 2008 Reinoud Zandijk
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.66 2008/07/22 19:06:55 reinoud Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.67 2008/07/22 21:39:08 reinoud Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
|
||||
|
@ -3888,6 +3888,9 @@ udf_dirhash_purge(struct udf_dirhash *dirh)
|
|||
if (dirh == NULL)
|
||||
return;
|
||||
|
||||
if (dirh->size == 0)
|
||||
return;
|
||||
|
||||
for (hashline = 0; hashline < UDF_DIRHASH_HASHSIZE; hashline++) {
|
||||
dirh_e = LIST_FIRST(&dirh->entries[hashline]);
|
||||
while (dirh_e) {
|
||||
|
|
Loading…
Reference in New Issue