summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
521a468)
SCCS-vsn: sys/kern/vfs_cache.c 7.7
SCCS-vsn: sys/kern/vfs_subr.c 7.48
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)vfs_cache.c 7.6 (Berkeley) %G%
+ * @(#)vfs_cache.c 7.7 (Berkeley) %G%
*/
#include "param.h"
#include "systm.h"
#include "time.h"
*/
#include "param.h"
#include "systm.h"
#include "time.h"
#include "vnode.h"
#include "namei.h"
#include "errno.h"
#include "vnode.h"
#include "namei.h"
#include "errno.h"
*/
if (numcache < desiredvnodes) {
ncp = (struct namecache *)
*/
if (numcache < desiredvnodes) {
ncp = (struct namecache *)
- malloc(sizeof *ncp, M_CACHE, M_WAITOK);
+ malloc((u_long)sizeof *ncp, M_CACHE, M_WAITOK);
bzero((char *)ncp, sizeof *ncp);
numcache++;
} else if (ncp = nchhead) {
bzero((char *)ncp, sizeof *ncp);
numcache++;
} else if (ncp = nchhead) {
nchtail = &nchhead;
nchashsize = roundup((desiredvnodes + 1) * sizeof *nchp / 2,
NBPG * CLSIZE);
nchtail = &nchhead;
nchashsize = roundup((desiredvnodes + 1) * sizeof *nchp / 2,
NBPG * CLSIZE);
- nchashtbl = (union nchash *)malloc(nchashsize, M_CACHE, M_WAITOK);
+ nchashtbl = (union nchash *)malloc((u_long)nchashsize,
+ M_CACHE, M_WAITOK);
for (nchash = 1; nchash <= nchashsize / sizeof *nchp; nchash <<= 1)
/* void */;
nchash = (nchash >> 1) - 1;
for (nchash = 1; nchash <= nchashsize / sizeof *nchp; nchash <<= 1)
/* void */;
nchash = (nchash >> 1) - 1;
* inode. This makes the algorithm O(n^2), but do you think I care?
*/
cache_purgevfs(mp)
* inode. This makes the algorithm O(n^2), but do you think I care?
*/
cache_purgevfs(mp)
- register struct mount *mp;
{
register struct namecache *ncp, *nxtcp;
{
register struct namecache *ncp, *nxtcp;
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)vfs_subr.c 7.47 (Berkeley) %G%
+ * @(#)vfs_subr.c 7.48 (Berkeley) %G%
* Free a busy filesystem.
* Panic if filesystem is not busy.
*/
* Free a busy filesystem.
* Panic if filesystem is not busy.
*/
vfs_unbusy(mp)
register struct mount *mp;
{
vfs_unbusy(mp)
register struct mount *mp;
{
register struct vnode *vp, *vq;
if (numvnodes < desiredvnodes) {
register struct vnode *vp, *vq;
if (numvnodes < desiredvnodes) {
- vp = (struct vnode *)malloc(sizeof *vp, M_VNODE, M_WAITOK);
+ vp = (struct vnode *)malloc((u_long)sizeof *vp,
+ M_VNODE, M_WAITOK);
bzero((char *)vp, sizeof *vp);
numvnodes++;
} else {
bzero((char *)vp, sizeof *vp);
numvnodes++;
} else {
*/
void vclean(vp, flags)
register struct vnode *vp;
*/
void vclean(vp, flags)
register struct vnode *vp;
{
struct vnodeops *origops;
int active;
{
struct vnodeops *origops;
int active;
* Dump vnode list (via kinfo).
* Copyout address of vnode followed by vnode.
*/
* Dump vnode list (via kinfo).
* Copyout address of vnode followed by vnode.
*/
kinfo_vnode(op, where, acopysize, arg, aneeded)
kinfo_vnode(op, where, acopysize, arg, aneeded)
- int *acopysize, *aneeded;
+ int *acopysize, arg, *aneeded;
{
register struct mount *mp = rootfs;
struct mount *omp;
struct vnode *vp;
{
register struct mount *mp = rootfs;
struct mount *omp;
struct vnode *vp;
register char *bp = where, *savebp;
char *ewhere = where + *acopysize;
int error;
register char *bp = where, *savebp;
char *ewhere = where + *acopysize;
int error;