summaryrefslogtreecommitdiffstats
path: root/sys/security/audit/audit_worker.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/security/audit/audit_worker.c')
-rw-r--r--sys/security/audit/audit_worker.c8
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);
}
}
OpenPOWER on IntegriCloud