Fixed spacefree calculation in ext2_direnter(). This bug sometimes caused
panics. This should be in 2.2, of course. Submitted by: davidg Obtained from: bouyer@antioche.ibp.fr (Manuel BOUYER) (fix for NetBSD)
This commit is contained in:
parent
f886b4857a
commit
68a9989171
@ -856,7 +856,7 @@ ext2_direnter(ip, dvp, cnp)
|
||||
/* overwrite; nothing there; header is ours */
|
||||
spacefree += dsize;
|
||||
}
|
||||
dsize = EXT2_DIR_REC_LEN(ep->name_len);
|
||||
dsize = EXT2_DIR_REC_LEN(nep->name_len);
|
||||
spacefree += nep->rec_len - dsize;
|
||||
loc += nep->rec_len;
|
||||
bcopy((caddr_t)nep, (caddr_t)ep, dsize);
|
||||
|
@ -856,7 +856,7 @@ ext2_direnter(ip, dvp, cnp)
|
||||
/* overwrite; nothing there; header is ours */
|
||||
spacefree += dsize;
|
||||
}
|
||||
dsize = EXT2_DIR_REC_LEN(ep->name_len);
|
||||
dsize = EXT2_DIR_REC_LEN(nep->name_len);
|
||||
spacefree += nep->rec_len - dsize;
|
||||
loc += nep->rec_len;
|
||||
bcopy((caddr_t)nep, (caddr_t)ep, dsize);
|
||||
|
Loading…
Reference in New Issue
Block a user