Fix MFS ftruncate crash (Bug#370, reported by Aki Goto)
This commit is contained in:
parent
6dc5d42798
commit
c8f8d69204
1 changed files with 3 additions and 3 deletions
|
@ -166,10 +166,10 @@ int op; /* special actions */
|
|||
}
|
||||
|
||||
/* If the single indirect block isn't there (or was just freed),
|
||||
* see if we have to keep the double indirect block.
|
||||
* see if we have to keep the double indirect block, if any.
|
||||
*/
|
||||
if(z1 == NO_ZONE && !single && empty_indir(bp_dindir, rip->i_sp) &&
|
||||
z2 != NO_ZONE) {
|
||||
if(z1 == NO_ZONE && !single && z2 != NO_ZONE &&
|
||||
empty_indir(bp_dindir, rip->i_sp)) {
|
||||
free_zone(rip->i_dev, z2);
|
||||
rip->i_zone[zones+1] = NO_ZONE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue