MCPcopy Create free account
hub / github.com/F-Stack/f-stack / acct_disable

Function acct_disable

freebsd/kern/kern_acct.c:323–339  ·  view source on GitHub ↗

* Disable currently in-progress accounting by closing the vnode, dropping * our reference to the credential, and clearing the vnode's flags. */

Source from the content-addressed store, hash-verified

321 * our reference to the credential, and clearing the vnode's flags.
322 */
323static int
324acct_disable(struct thread *td, int logging)
325{
326 int error;
327
328 sx_assert(&acct_sx, SX_XLOCKED);
329 error = vn_close(acct_vp, acct_flags, acct_cred, td);
330 crfree(acct_cred);
331 lim_free(acct_limit);
332 acct_configured = 0;
333 acct_vp = NULL;
334 acct_cred = NULL;
335 acct_flags = 0;
336 if (logging)
337 log(LOG_NOTICE, "Accounting disabled\n");
338 return (error);
339}
340
341/*
342 * Write out process accounting information, on process exit.

Callers 2

sys_acctFunction · 0.85
acctwatchFunction · 0.85

Calls 4

vn_closeFunction · 0.70
crfreeFunction · 0.70
lim_freeFunction · 0.70
logFunction · 0.70

Tested by

no test coverage detected