mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 21:32:58 +00:00
MFC r316852:
In fsck_ffs pass1, prevent the inosused variable from wrapping. PR: 218592
This commit is contained in:
parent
bf330ac885
commit
cfacd61cad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=317250
@ -133,9 +133,14 @@ pass1(void)
|
||||
*/
|
||||
if ((preen || inoopt) && usedsoftdep && !rebuildcg) {
|
||||
cp = &cg_inosused(cgp)[(inosused - 1) / CHAR_BIT];
|
||||
for ( ; inosused > 0; inosused -= CHAR_BIT, cp--) {
|
||||
if (*cp == 0)
|
||||
for ( ; inosused != 0; cp--) {
|
||||
if (*cp == 0) {
|
||||
if (inosused > CHAR_BIT)
|
||||
inosused -= CHAR_BIT;
|
||||
else
|
||||
inosused = 0;
|
||||
continue;
|
||||
}
|
||||
for (i = 1 << (CHAR_BIT - 1); i > 0; i >>= 1) {
|
||||
if (*cp & i)
|
||||
break;
|
||||
@ -143,8 +148,6 @@ pass1(void)
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (inosused < 0)
|
||||
inosused = 0;
|
||||
}
|
||||
/*
|
||||
* Allocate inoinfo structures for the allocated inodes.
|
||||
|
Loading…
Reference in New Issue
Block a user