diff options
author | jeff <jeff@FreeBSD.org> | 2003-08-31 11:26:52 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-08-31 11:26:52 +0000 |
commit | 90ec6986d9cc0e7a9b1db56bc81eede396989291 (patch) | |
tree | e2f2023aeb79528a0577eb7afa330f7ca7f19777 /sys/ufs/ffs | |
parent | 86f70ead2114c0de8a016de4bb047d9ad8aeaf69 (diff) | |
download | FreeBSD-src-90ec6986d9cc0e7a9b1db56bc81eede396989291.zip FreeBSD-src-90ec6986d9cc0e7a9b1db56bc81eede396989291.tar.gz |
- Backout rev 1.142. This caused a deadlock that I do not understand. More
investigation is required.
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 6ea776a..429f98f 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -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); - if (bp != NULL && (wk = LIST_FIRST(&bp->b_dep)) != NULL) { + /* XXX Buf not locked! */ + if ((bp = incore(freeblks->fb_devvp, dbn)) != 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,8 +2582,6 @@ 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); |