| 108 | #define AUDIT_WORKER_UNLOCK() sx_xunlock(&audit_worker_lock) |
| 109 | |
| 110 | static void |
| 111 | audit_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 |
no test coverage detected