diff options
author | 2009-08-27 23:39:46 +0000 | |
---|---|---|
committer | 2009-08-27 23:39:46 +0000 | |
commit | 469c0eb21db09278d0e39409bc1a4e9e3b2322fc (patch) | |
tree | b88262f152fea62a0faf652ab736529e8bab70cb | |
parent | introduce a flag member to struct nfs_aiod, and use flags instead of the exit (diff) | |
download | wireguard-openbsd-469c0eb21db09278d0e39409bc1a4e9e3b2322fc.tar.xz wireguard-openbsd-469c0eb21db09278d0e39409bc1a4e9e3b2322fc.zip |
Garbage collect two variables that where set but unused.
Tiny spacing nit.
Fix a typo, pointed out by miod@.
-rw-r--r-- | sys/nfs/nfs_aiod.c | 10 | ||||
-rw-r--r-- | sys/nfs/nfs_bio.c | 4 |
2 files changed, 5 insertions, 9 deletions
diff --git a/sys/nfs/nfs_aiod.c b/sys/nfs/nfs_aiod.c index 937fa44d36d..3a9451b021d 100644 --- a/sys/nfs/nfs_aiod.c +++ b/sys/nfs/nfs_aiod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_aiod.c,v 1.3 2009/08/27 23:26:56 thib Exp $ */ +/* $OpenBSD: nfs_aiod.c,v 1.4 2009/08/27 23:39:46 thib Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -74,10 +74,8 @@ nfs_aiod(void *arg) struct nfsmount *nmp; struct proc *p; struct buf *bp; - int error; p = (struct proc *)arg; - error = 0; aiod = malloc(sizeof(*aiod), M_TEMP, M_WAITOK|M_ZERO); mtx_enter(&nfs_aiodl_mtx); @@ -102,7 +100,6 @@ nfs_aiod(void *arg) loop: /* Loop around until SIGKILL */ - if (aiod->nad_flags & NFSAIOD_WAKEUP) { mtx_enter(&nfs_aiodl_mtx); LIST_INSERT_HEAD(&nfs_aiods_idle, aiod, nad_idle); @@ -161,7 +158,7 @@ out1: nfs_aiodbufqmax = max((bcstats.numbufs / 4) / nfs_numaiods, 64); else nfs_aiodbufqmax = 0; - kthread_exit(error); + kthread_exit(0); } int @@ -169,12 +166,11 @@ nfs_set_naiod(int howmany) { struct nfs_aiod *aiod; struct proc *p; - int want, error, dolock; + int want, error; KASSERT(howmany >= 0); error = 0; - dolock = 1; if (nfs_numaiods == -1) nfs_numaiods = 0; diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index c39ff82666c..45e827946f1 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/nfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_bio.c,v 1.65 2009/08/27 23:26:56 thib Exp $ */ +/* $OpenBSD: nfs_bio.c,v 1.66 2009/08/27 23:39:46 thib Exp $ */ /* $NetBSD: nfs_bio.c,v 1.25.4.2 1996/07/08 20:47:04 jtc Exp $ */ /* @@ -550,7 +550,7 @@ nfs_asyncio(struct buf *bp) /* - * Make sure we don't queue up to much. + * Make sure we don't queue up too much. * TODO: Look into implementing migration for aiods. */ if (nmp->nm_bufqlen >= nfs_aiodbufqmax) { |