1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

In getblk(), before gbincore(), use BO_LOCK directly when locking

the bufobj, rather than using VI_LOCK, like what was done with
revision 1.453.
This commit is contained in:
Xin LI 2007-06-08 07:05:08 +00:00
parent 4f68049e7b
commit 7b8c8b858c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170424

View File

@ -2450,7 +2450,7 @@ getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo,
mtx_unlock(&nblock);
}
VI_LOCK(vp);
BO_LOCK(bo);
bp = gbincore(bo, blkno);
if (bp != NULL) {
int lockflags;
@ -2579,7 +2579,7 @@ getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo,
* returned by getnewbuf() is locked. Note that the returned
* buffer is also considered valid (not marked B_INVAL).
*/
VI_UNLOCK(vp);
BO_UNLOCK(bo);
/*
* If the user does not want us to create the buffer, bail out
* here.