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

Function audit_worker_sync_vp

freebsd/security/audit/audit_worker.c:110–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108#define AUDIT_WORKER_UNLOCK() sx_xunlock(&audit_worker_lock)
109
110static void
111audit_worker_sync_vp(struct vnode *vp, struct mount *mp, const char *fmt, ...)
112{
113 struct mount *mp1;
114 int error;
115 va_list va;
116
117 va_start(va, fmt);
118 error = vn_start_write(vp, &mp1, 0);
119 if (error == 0) {
120 VOP_LOCK(vp, LK_EXCLUSIVE | LK_RETRY);
121 (void)VOP_FSYNC(vp, MNT_WAIT, curthread);
122 VOP_UNLOCK(vp);
123 vn_finished_write(mp1);
124 }
125 vfs_unbusy(mp);
126 vpanic(fmt, va);
127 va_end(va);
128}
129
130/*
131 * Write an audit record to a file, performed as the last stage after both

Callers 1

audit_record_writeFunction · 0.85

Calls 4

vn_start_writeFunction · 0.85
vn_finished_writeFunction · 0.85
vfs_unbusyFunction · 0.85
vpanicFunction · 0.50

Tested by

no test coverage detected