Don't hold acct_mtx over limcopy(), since it's unnecessary and
limcopy() can sleep. Approved by: re
This commit is contained in:
parent
c8f43965d6
commit
8b5f8b061a
@ -285,6 +285,13 @@ acct_process(td)
|
||||
/* (8) The boolean flags that tell how the process terminated, etc. */
|
||||
acct.ac_flag = p->p_acflag;
|
||||
|
||||
/*
|
||||
* Write the accounting information to the file.
|
||||
*/
|
||||
uc = crhold(acctcred);
|
||||
vref(vp);
|
||||
mtx_unlock(&acct_mtx);
|
||||
|
||||
/*
|
||||
* Eliminate any file size rlimit.
|
||||
*/
|
||||
@ -295,12 +302,6 @@ acct_process(td)
|
||||
}
|
||||
p->p_rlimit[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
|
||||
|
||||
/*
|
||||
* Write the accounting information to the file.
|
||||
*/
|
||||
uc = crhold(acctcred);
|
||||
vref(vp);
|
||||
mtx_unlock(&acct_mtx);
|
||||
VOP_LEASE(vp, td, uc, LEASE_WRITE);
|
||||
ret = vn_rdwr(UIO_WRITE, vp, (caddr_t)&acct, sizeof (acct),
|
||||
(off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, uc, NOCRED,
|
||||
|
Loading…
x
Reference in New Issue
Block a user