[Midnightbsd-cvs] src [9119] trunk/sys/ufs/ffs/ffs_softdep.c: The code in clear_remove() and clear_inodepeps() skips one entry in the pagedep and inodedep hash tables.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Oct 1 20:34:47 EDT 2016
Revision: 9119
http://svnweb.midnightbsd.org/src/?rev=9119
Author: laffer1
Date: 2016-10-01 20:34:47 -0400 (Sat, 01 Oct 2016)
Log Message:
-----------
The code in clear_remove() and clear_inodepeps() skips one entry in the pagedep and inodedep hash tables. Fix it. Obtained from: FreeBSD SVN 249597
Modified Paths:
--------------
trunk/sys/ufs/ffs/ffs_softdep.c
Modified: trunk/sys/ufs/ffs/ffs_softdep.c
===================================================================
--- trunk/sys/ufs/ffs/ffs_softdep.c 2016-10-02 00:32:06 UTC (rev 9118)
+++ trunk/sys/ufs/ffs/ffs_softdep.c 2016-10-02 00:34:47 UTC (rev 9119)
@@ -13026,9 +13026,9 @@
mtx_assert(&lk, MA_OWNED);
- for (cnt = 0; cnt < pagedep_hash; cnt++) {
+ for (cnt = 0; cnt <= pagedep_hash; cnt++) {
pagedephd = &pagedep_hashtbl[next++];
- if (next >= pagedep_hash)
+ if (next > pagedep_hash)
next = 0;
LIST_FOREACH(pagedep, pagedephd, pd_hash) {
if (LIST_EMPTY(&pagedep->pd_dirremhd))
@@ -13090,9 +13090,9 @@
* We will then gather up all the inodes in its block
* that have dependencies and flush them out.
*/
- for (cnt = 0; cnt < inodedep_hash; cnt++) {
+ for (cnt = 0; cnt <= inodedep_hash; cnt++) {
inodedephd = &inodedep_hashtbl[next++];
- if (next >= inodedep_hash)
+ if (next > inodedep_hash)
next = 0;
if ((inodedep = LIST_FIRST(inodedephd)) != NULL)
break;
More information about the Midnightbsd-cvs
mailing list