- /*
- * Rotate the vnode/cred, and clear the rotate flag so that we will
- * send a rotate trigger if the new file fills.
- */
- AUDIT_WORKER_SX_XLOCK();
- old_audit_cred = audit_ctx.vc_ucred;
- old_audit_vp = audit_vp;
- audit_ctx.vc_ucred = cred;
- audit_file_rotate_wait = 0;
- audit_was_enabled = audit_enabled;
- if ((audit_enabled = (NULL != vp)))
- audit_vp = vp;
- audit_draining = (audit_was_enabled && !audit_enabled);
- AUDIT_WORKER_SX_XUNLOCK();