diff options
author | kib <kib@FreeBSD.org> | 2012-10-22 17:50:54 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-10-22 17:50:54 +0000 |
commit | 560aa751e0f5cfef868bdf3fab01cdbc5169ef82 (patch) | |
tree | 6e9ef0a47c5e91d26227820c50c9767e84550821 /sys/security/audit/audit_worker.c | |
parent | ca71b68ea40c83f641d6485e027368568f244197 (diff) | |
download | FreeBSD-src-560aa751e0f5cfef868bdf3fab01cdbc5169ef82.zip FreeBSD-src-560aa751e0f5cfef868bdf3fab01cdbc5169ef82.tar.gz |
Remove the support for using non-mpsafe filesystem modules.
In particular, do not lock Giant conditionally when calling into the
filesystem module, remove the VFS_LOCK_GIANT() and related
macros. Stop handling buffers belonging to non-mpsafe filesystems.
The VFS_VERSION is bumped to indicate the interface change which does
not result in the interface signatures changes.
Conducted and reviewed by: attilio
Tested by: pho
Diffstat (limited to 'sys/security/audit/audit_worker.c')
-rw-r--r-- | sys/security/audit/audit_worker.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/security/audit/audit_worker.c b/sys/security/audit/audit_worker.c index 631b29f..d21ae18 100644 --- a/sys/security/audit/audit_worker.c +++ b/sys/security/audit/audit_worker.c @@ -113,7 +113,7 @@ audit_record_write(struct vnode *vp, struct ucred *cred, void *data, static struct timeval last_fail; static int cur_lowspace_trigger; struct statfs *mnt_stat; - int error, vfslocked; + int error; static int cur_fail; struct vattr vattr; long temp; @@ -124,7 +124,6 @@ audit_record_write(struct vnode *vp, struct ucred *cred, void *data, return; mnt_stat = &vp->v_mount->mnt_stat; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); /* * First, gather statistics on the audit log file and file system so @@ -258,7 +257,6 @@ audit_record_write(struct vnode *vp, struct ucred *cred, void *data, } } - VFS_UNLOCK_GIANT(vfslocked); return; fail_enospc: @@ -289,7 +287,6 @@ fail: panic("audit_worker: write error %d\n", error); } else if (ppsratecheck(&last_fail, &cur_fail, 1)) printf("audit_worker: write error %d\n", error); - VFS_UNLOCK_GIANT(vfslocked); } /* @@ -451,7 +448,6 @@ audit_rotate_vnode(struct ucred *cred, struct vnode *vp) { struct ucred *old_audit_cred; struct vnode *old_audit_vp; - int vfslocked; KASSERT((cred != NULL && vp != NULL) || (cred == NULL && vp == NULL), ("audit_rotate_vnode: cred %p vp %p", cred, vp)); @@ -473,10 +469,8 @@ audit_rotate_vnode(struct ucred *cred, struct vnode *vp) * If there was an old vnode/credential, close and free. */ if (old_audit_vp != NULL) { - vfslocked = VFS_LOCK_GIANT(old_audit_vp->v_mount); vn_close(old_audit_vp, AUDIT_CLOSE_FLAGS, old_audit_cred, curthread); - VFS_UNLOCK_GIANT(vfslocked); crfree(old_audit_cred); } } |