summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exit.c2
-rw-r--r--sys/kern/kern_synch.c6
-rw-r--r--sys/kern/vfs_cluster.c2
-rw-r--r--sys/kern/vfs_init.c4
4 files changed, 3 insertions, 11 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 07b7c6c..5335098 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -951,12 +951,10 @@ static int
proc_to_reap(struct thread *td, struct proc *p, idtype_t idtype, id_t id,
int *status, int options, struct __wrusage *wrusage, siginfo_t *siginfo)
{
- struct proc *q;
struct rusage *rup;
sx_assert(&proctree_lock, SA_XLOCKED);
- q = td->td_proc;
PROC_LOCK(p);
switch (idtype) {
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 0236e98..867c263 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -432,11 +432,9 @@ mi_switch(int flags, struct thread *newtd)
{
uint64_t runtime, new_switchtime;
struct thread *td;
- struct proc *p;
td = curthread; /* XXX */
THREAD_LOCK_ASSERT(td, MA_OWNED | MA_NOTRECURSED);
- p = td->td_proc; /* XXX */
KASSERT(!TD_ON_RUNQ(td), ("mi_switch: called by old code"));
#ifdef INVARIANTS
if (!TD_ON_LOCK(td) && !TD_IS_RUNNING(td))
@@ -476,7 +474,7 @@ mi_switch(int flags, struct thread *newtd)
PCPU_INC(cnt.v_swtch);
PCPU_SET(switchticks, ticks);
CTR4(KTR_PROC, "mi_switch: old thread %ld (td_sched %p, pid %ld, %s)",
- td->td_tid, td->td_sched, p->p_pid, td->td_name);
+ td->td_tid, td->td_sched, td->td_proc->p_pid, td->td_name);
#if (KTR_COMPILE & KTR_SCHED) != 0
if (TD_IS_IDLETHREAD(td))
KTR_STATE1(KTR_SCHED, "thread", sched_tdname(td), "idle",
@@ -495,7 +493,7 @@ mi_switch(int flags, struct thread *newtd)
"prio:%d", td->td_priority);
CTR4(KTR_PROC, "mi_switch: new thread %ld (td_sched %p, pid %ld, %s)",
- td->td_tid, td->td_sched, p->p_pid, td->td_name);
+ td->td_tid, td->td_sched, td->td_proc->p_pid, td->td_name);
/*
* If the last thread was exiting, finish cleaning it up.
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 9601082..362ebb7b 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -310,7 +310,6 @@ static struct buf *
cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn,
daddr_t blkno, long size, int run, int gbflags, struct buf *fbp)
{
- struct bufobj *bo;
struct buf *bp, *tbp;
daddr_t bn;
off_t off;
@@ -376,7 +375,6 @@ cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn,
bp->b_npages = 0;
inc = btodb(size);
- bo = &vp->v_bufobj;
for (bn = blkno, i = 0; i < run; ++i, bn += inc) {
if (i == 0) {
VM_OBJECT_WLOCK(tbp->b_bufobj->bo_object);
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c
index dd21743..ffc71ef 100644
--- a/sys/kern/vfs_init.c
+++ b/sys/kern/vfs_init.c
@@ -312,9 +312,7 @@ static int
vfs_unregister(struct vfsconf *vfc)
{
struct vfsconf *vfsp;
- int error, i, maxtypenum;
-
- i = vfc->vfc_typenum;
+ int error, maxtypenum;
vfsconf_lock();
vfsp = vfs_byname_locked(vfc->vfc_name);
OpenPOWER on IntegriCloud