mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-18 22:33:39 +00:00
- Reinstate 1.142 this was fixed by 1.144.
This commit is contained in:
parent
016b0ff405
commit
8af6a57099
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120839
|
@ -2563,10 +2563,10 @@ indir_trunc(freeblks, dbn, level, lbn, countp)
|
|||
* a complete copy of the indirect block in memory for our use.
|
||||
* Otherwise we have to read the blocks in from the disk.
|
||||
*/
|
||||
bp = getblk(freeblks->fb_devvp, dbn, (int)fs->fs_bsize, 0, 0,
|
||||
GB_NOCREAT);
|
||||
ACQUIRE_LOCK(&lk);
|
||||
/* XXX Buf not locked! */
|
||||
if ((bp = incore(freeblks->fb_devvp, dbn)) != NULL &&
|
||||
(wk = LIST_FIRST(&bp->b_dep)) != NULL) {
|
||||
if (bp != NULL && (wk = LIST_FIRST(&bp->b_dep)) != NULL) {
|
||||
if (wk->wk_type != D_INDIRDEP ||
|
||||
(indirdep = WK_INDIRDEP(wk))->ir_savebp != bp ||
|
||||
(indirdep->ir_state & GOINGAWAY) == 0) {
|
||||
|
@ -2582,6 +2582,8 @@ indir_trunc(freeblks, dbn, level, lbn, countp)
|
|||
VFSTOUFS(freeblks->fb_mnt)->um_numindirdeps -= 1;
|
||||
FREE_LOCK(&lk);
|
||||
} else {
|
||||
if (bp)
|
||||
brelse(bp);
|
||||
FREE_LOCK(&lk);
|
||||
error = bread(freeblks->fb_devvp, dbn, (int)fs->fs_bsize,
|
||||
NOCRED, &bp);
|
||||
|
|
Loading…
Reference in a new issue