diff options
| author | ad <ad@NetBSD.org> | 2006-07-21 16:48:45 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2006-07-21 16:48:45 +0000 |
| commit | 3029ac48c7008a9c5766a90a8ecd56bfa9df470a (patch) | |
| tree | 64095aaeca7bfa37d2bc81833cb9a92422d31320 /sys/dev/raidframe | |
| parent | 888ea5adc517ed139e7e2be411b3263fa58ff0db (diff) | |
- Use the LWP cached credentials where sane.
- Minor cosmetic changes.
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_copyback.c | 10 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_disks.c | 10 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 14 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_reconstruct.c | 8 |
4 files changed, 18 insertions, 24 deletions
diff --git a/sys/dev/raidframe/rf_copyback.c b/sys/dev/raidframe/rf_copyback.c index 018c423c771..5027b51ad55 100644 --- a/sys/dev/raidframe/rf_copyback.c +++ b/sys/dev/raidframe/rf_copyback.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_copyback.c,v 1.33 2006/05/14 21:45:00 elad Exp $ */ +/* $NetBSD: rf_copyback.c,v 1.34 2006/07/21 16:48:52 ad Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -38,7 +38,7 @@ ****************************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.33 2006/05/14 21:45:00 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.34 2006/07/21 16:48:52 ad Exp $"); #include <dev/raidframe/raidframevar.h> @@ -154,12 +154,10 @@ rf_CopybackReconstructedData(RF_Raid_t *raidPtr) /* Ok, so we can at least do a lookup... How about actually * getting a vp for it? */ - if ((retcode = VOP_GETATTR(vp, &va, - l->l_proc->p_cred, l)) != 0) { + if ((retcode = VOP_GETATTR(vp, &va, l->l_cred, l)) != 0) return; - } retcode = VOP_IOCTL(vp, DIOCGPART, &dpart, - FREAD, l->l_proc->p_cred, l); + FREAD, l->l_cred, l); if (retcode) { return; } diff --git a/sys/dev/raidframe/rf_disks.c b/sys/dev/raidframe/rf_disks.c index 876bcd14830..860f2c9189d 100644 --- a/sys/dev/raidframe/rf_disks.c +++ b/sys/dev/raidframe/rf_disks.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_disks.c,v 1.60 2006/05/14 21:45:00 elad Exp $ */ +/* $NetBSD: rf_disks.c,v 1.61 2006/07/21 16:48:52 ad Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -67,7 +67,7 @@ ***************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.60 2006/05/14 21:45:00 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.61 2006/07/21 16:48:52 ad Exp $"); #include <dev/raidframe/raidframevar.h> @@ -615,12 +615,10 @@ rf_ConfigureDisk(RF_Raid_t *raidPtr, char *bf, RF_RaidDisk_t *diskPtr, } if (diskPtr->status == rf_ds_optimal) { - if ((error = VOP_GETATTR(vp, &va, - l->l_proc->p_cred, l)) != 0) { + if ((error = VOP_GETATTR(vp, &va, l->l_cred, l)) != 0) return (error); - } error = VOP_IOCTL(vp, DIOCGPART, &dpart, - FREAD, l->l_proc->p_cred, l); + FREAD, l->l_cred, l); if (error) { return (error); } diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index f3d6e15a889..26e2200ba6b 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.209 2006/06/12 22:49:35 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.210 2006/07/21 16:48:52 ad Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -146,7 +146,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.209 2006/06/12 22:49:35 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.210 2006/07/21 16:48:52 ad Exp $"); #include <sys/param.h> #include <sys/errno.h> @@ -2105,13 +2105,11 @@ raidlookup(char *path, struct lwp *l, struct vnode **vpp) { struct nameidata nd; struct vnode *vp; - struct proc *p; struct vattr va; int error; if (l == NULL) return(ESRCH); /* Is ESRCH the best choice? */ - p = l->l_proc; NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, l); if ((error = vn_open(&nd, FREAD | FWRITE, 0)) != 0) { @@ -2120,18 +2118,18 @@ raidlookup(char *path, struct lwp *l, struct vnode **vpp) vp = nd.ni_vp; if (vp->v_usecount > 1) { VOP_UNLOCK(vp, 0); - (void) vn_close(vp, FREAD | FWRITE, p->p_cred, l); + (void) vn_close(vp, FREAD | FWRITE, l->l_cred, l); return (EBUSY); } - if ((error = VOP_GETATTR(vp, &va, p->p_cred, l)) != 0) { + if ((error = VOP_GETATTR(vp, &va, l->l_cred, l)) != 0) { VOP_UNLOCK(vp, 0); - (void) vn_close(vp, FREAD | FWRITE, p->p_cred, l); + (void) vn_close(vp, FREAD | FWRITE, l->l_cred, l); return (error); } /* XXX: eventually we should handle VREG, too. */ if (va.va_type != VBLK) { VOP_UNLOCK(vp, 0); - (void) vn_close(vp, FREAD | FWRITE, p->p_cred, l); + (void) vn_close(vp, FREAD | FWRITE, l->l_cred, l); return (ENOTBLK); } VOP_UNLOCK(vp, 0); diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c index 0d935dc7da9..71bf2517ee8 100644 --- a/sys/dev/raidframe/rf_reconstruct.c +++ b/sys/dev/raidframe/rf_reconstruct.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstruct.c,v 1.91 2006/05/14 21:45:00 elad Exp $ */ +/* $NetBSD: rf_reconstruct.c,v 1.92 2006/07/21 16:48:52 ad Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ ************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.91 2006/05/14 21:45:00 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.92 2006/07/21 16:48:52 ad Exp $"); #include <sys/time.h> #include <sys/buf.h> @@ -456,7 +456,7 @@ rf_ReconstructInPlace(RF_Raid_t *raidPtr, RF_RowCol_t col) /* Ok, so we can at least do a lookup... How about actually getting a vp for it? */ - if ((retcode = VOP_GETATTR(vp, &va, lwp->l_proc->p_cred, lwp)) != 0) { + if ((retcode = VOP_GETATTR(vp, &va, lwp->l_cred, lwp)) != 0) { RF_LOCK_MUTEX(raidPtr->mutex); raidPtr->reconInProgress--; RF_UNLOCK_MUTEX(raidPtr->mutex); @@ -464,7 +464,7 @@ rf_ReconstructInPlace(RF_Raid_t *raidPtr, RF_RowCol_t col) return(retcode); } - retcode = VOP_IOCTL(vp, DIOCGPART, &dpart, FREAD, lwp->l_proc->p_cred, lwp); + retcode = VOP_IOCTL(vp, DIOCGPART, &dpart, FREAD, lwp->l_cred, lwp); if (retcode) { RF_LOCK_MUTEX(raidPtr->mutex); raidPtr->reconInProgress--; |
