mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 21:47:45 +00:00
windows-buf-more-clean-vnode-speedups-20080301
LICENSE MIT do not call buf_CleanAsync if you know the buffer isn't dirty
This commit is contained in:
parent
7083ceec5c
commit
b47407ae72
@ -1605,6 +1605,7 @@ long buf_CleanVnode(struct cm_scache *scp, cm_user_t *userp, cm_req_t *reqp)
|
||||
/* clean buffer synchronously */
|
||||
if (cm_FidCmp(&bp->fid, &scp->fid) == 0) {
|
||||
lock_ObtainMutex(&bp->mx);
|
||||
if (bp->flags & CM_BUF_DIRTY) {
|
||||
if (userp) {
|
||||
cm_HoldUser(userp);
|
||||
if (bp->userp)
|
||||
@ -1618,6 +1619,7 @@ long buf_CleanVnode(struct cm_scache *scp, cm_user_t *userp, cm_req_t *reqp)
|
||||
if (code == 0)
|
||||
code = -1;
|
||||
}
|
||||
}
|
||||
lock_ReleaseMutex(&bp->mx);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user