- Use ANSI function decls.
- Sprinkle some static.
This commit is contained in:
parent
16e20b37d6
commit
175c3312a8
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quota.h,v 1.18 2004/04/27 17:37:31 jrf Exp $ */
|
||||
/* $NetBSD: quota.h,v 1.19 2005/07/10 00:18:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
@ -178,37 +178,37 @@ struct ucred;
|
||||
struct ufsmount;
|
||||
struct vnode;
|
||||
__BEGIN_DECLS
|
||||
int chkdq __P((struct inode *, int64_t, struct ucred *, int));
|
||||
int chkdqchg __P((struct inode *, int64_t, struct ucred *, int));
|
||||
int chkiq __P((struct inode *, int32_t, struct ucred *, int));
|
||||
int chkiqchg __P((struct inode *, int32_t, struct ucred *, int));
|
||||
void dqflush __P((struct vnode *));
|
||||
int dqget __P((struct vnode *,
|
||||
u_long, struct ufsmount *, int, struct dquot **));
|
||||
void dqinit __P((void));
|
||||
void dqreinit __P((void));
|
||||
void dqdone __P((void));
|
||||
void dqref __P((struct dquot *));
|
||||
void dqrele __P((struct vnode *, struct dquot *));
|
||||
int dqsync __P((struct vnode *, struct dquot *));
|
||||
int getinoquota __P((struct inode *));
|
||||
int getquota __P((struct mount *, u_long, int, caddr_t));
|
||||
int qsync __P((struct mount *mp));
|
||||
int quotaoff __P((struct proc *, struct mount *, int));
|
||||
int quotaon __P((struct proc *, struct mount *, int, caddr_t));
|
||||
int setquota __P((struct mount *, u_long, int, caddr_t));
|
||||
int setuse __P((struct mount *, u_long, int, caddr_t));
|
||||
int ufs_quotactl __P((struct mount *, int, uid_t, void *, struct proc *));
|
||||
int chkdq(struct inode *, int64_t, struct ucred *, int);
|
||||
int chkdqchg(struct inode *, int64_t, struct ucred *, int);
|
||||
int chkiq(struct inode *, int32_t, struct ucred *, int);
|
||||
int chkiqchg(struct inode *, int32_t, struct ucred *, int);
|
||||
void dqflush(struct vnode *);
|
||||
int dqget(struct vnode *,
|
||||
u_long, struct ufsmount *, int, struct dquot **);
|
||||
void dqinit(void);
|
||||
void dqreinit(void);
|
||||
void dqdone(void);
|
||||
void dqref(struct dquot *);
|
||||
void dqrele(struct vnode *, struct dquot *);
|
||||
int dqsync(struct vnode *, struct dquot *);
|
||||
int getinoquota(struct inode *);
|
||||
int getquota(struct mount *, u_long, int, caddr_t);
|
||||
int qsync(struct mount *mp);
|
||||
int quotaoff(struct proc *, struct mount *, int);
|
||||
int quotaon(struct proc *, struct mount *, int, caddr_t);
|
||||
int setquota(struct mount *, u_long, int, caddr_t);
|
||||
int setuse(struct mount *, u_long, int, caddr_t);
|
||||
int ufs_quotactl(struct mount *, int, uid_t, void *, struct proc *);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
__BEGIN_DECLS
|
||||
void chkdquot __P((struct inode *));
|
||||
void chkdquot(struct inode *);
|
||||
__END_DECLS
|
||||
#endif
|
||||
#else
|
||||
__BEGIN_DECLS
|
||||
int quotactl __P((const char *, int , int, void *));
|
||||
int quotactl(const char *, int , int, void *);
|
||||
__END_DECLS
|
||||
#endif /* _KERNEL */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ufs_bmap.c,v 1.35 2005/02/26 22:32:20 perry Exp $ */
|
||||
/* $NetBSD: ufs_bmap.c,v 1.36 2005/07/10 00:18:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1991, 1993
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.35 2005/02/26 22:32:20 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.36 2005/07/10 00:18:52 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -55,14 +55,8 @@ __KERNEL_RCSID(0, "$NetBSD: ufs_bmap.c,v 1.35 2005/02/26 22:32:20 perry Exp $");
|
||||
#include <ufs/ufs/ufs_extern.h>
|
||||
#include <ufs/ufs/ufs_bswap.h>
|
||||
|
||||
static boolean_t ufs_issequential __P((const struct ufsmount *,
|
||||
daddr_t, daddr_t));
|
||||
|
||||
static boolean_t
|
||||
ufs_issequential(ump, daddr0, daddr1)
|
||||
const struct ufsmount *ump;
|
||||
daddr_t daddr0;
|
||||
daddr_t daddr1;
|
||||
ufs_issequential(const struct ufsmount *ump, daddr_t daddr0, daddr_t daddr1)
|
||||
{
|
||||
|
||||
/* for ufs, blocks in a hole is not 'contiguous'. */
|
||||
@ -78,8 +72,7 @@ ufs_issequential(ump, daddr0, daddr1)
|
||||
* number to index into the array of block pointers described by the dinode.
|
||||
*/
|
||||
int
|
||||
ufs_bmap(v)
|
||||
void *v;
|
||||
ufs_bmap(void *v)
|
||||
{
|
||||
struct vop_bmap_args /* {
|
||||
struct vnode *a_vp;
|
||||
@ -116,14 +109,8 @@ ufs_bmap(v)
|
||||
*/
|
||||
|
||||
int
|
||||
ufs_bmaparray(vp, bn, bnp, ap, nump, runp, is_sequential)
|
||||
struct vnode *vp;
|
||||
daddr_t bn;
|
||||
daddr_t *bnp;
|
||||
struct indir *ap;
|
||||
int *nump;
|
||||
int *runp;
|
||||
ufs_issequential_callback_t is_sequential;
|
||||
ufs_bmaparray(struct vnode *vp, daddr_t bn, daddr_t *bnp, struct indir *ap,
|
||||
int *nump, int *runp, ufs_issequential_callback_t is_sequential)
|
||||
{
|
||||
struct inode *ip;
|
||||
struct buf *bp;
|
||||
@ -330,11 +317,7 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp, is_sequential)
|
||||
* once with the offset into the page itself.
|
||||
*/
|
||||
int
|
||||
ufs_getlbns(vp, bn, ap, nump)
|
||||
struct vnode *vp;
|
||||
daddr_t bn;
|
||||
struct indir *ap;
|
||||
int *nump;
|
||||
ufs_getlbns(struct vnode *vp, daddr_t bn, struct indir *ap, int *nump)
|
||||
{
|
||||
daddr_t metalbn, realbn;
|
||||
struct ufsmount *ump;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ufs_bswap.h,v 1.14 2004/08/15 07:19:58 mycroft Exp $ */
|
||||
/* $NetBSD: ufs_bswap.h,v 1.15 2005/07/10 00:18:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Manuel Bouyer.
|
||||
@ -52,30 +52,22 @@
|
||||
|
||||
#if !defined(_KERNEL) || defined(FFS_EI)
|
||||
/* inlines for access to swapped data */
|
||||
static __inline u_int16_t ufs_rw16 __P((u_int16_t, int));
|
||||
static __inline u_int32_t ufs_rw32 __P((u_int32_t, int));
|
||||
static __inline u_int64_t ufs_rw64 __P((u_int64_t, int));
|
||||
|
||||
static __inline u_int16_t
|
||||
ufs_rw16(a, ns)
|
||||
u_int16_t a;
|
||||
int ns;
|
||||
ufs_rw16(uint16_t a, int ns)
|
||||
{
|
||||
return ((ns) ? bswap16(a) : (a));
|
||||
return ((ns) ? bswap16(a) : (a));
|
||||
}
|
||||
|
||||
static __inline u_int32_t
|
||||
ufs_rw32(a, ns)
|
||||
u_int32_t a;
|
||||
int ns;
|
||||
ufs_rw32(uint32_t a, int ns)
|
||||
{
|
||||
return ((ns) ? bswap32(a) : (a));
|
||||
return ((ns) ? bswap32(a) : (a));
|
||||
}
|
||||
|
||||
static __inline u_int64_t
|
||||
ufs_rw64(a, ns)
|
||||
u_int64_t a;
|
||||
int ns;
|
||||
ufs_rw64(uint64_t a, int ns)
|
||||
{
|
||||
return ((ns) ? bswap64(a) : (a));
|
||||
return ((ns) ? bswap64(a) : (a));
|
||||
}
|
||||
#else
|
||||
#define ufs_rw16(a, ns) ((uint16_t)(a))
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ufs_extern.h,v 1.43 2005/05/29 21:25:24 christos Exp $ */
|
||||
/* $NetBSD: ufs_extern.h,v 1.44 2005/07/10 00:18:52 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993, 1994
|
||||
@ -58,116 +58,114 @@ extern struct pool ufs_direct_pool; /* memory pool for directs */
|
||||
|
||||
__BEGIN_DECLS
|
||||
#define ufs_abortop genfs_abortop
|
||||
int ufs_access __P((void *));
|
||||
int ufs_advlock __P((void *));
|
||||
int ufs_bmap __P((void *));
|
||||
int ufs_close __P((void *));
|
||||
int ufs_create __P((void *));
|
||||
int ufs_getattr __P((void *));
|
||||
int ufs_inactive __P((void *));
|
||||
int ufs_access(void *);
|
||||
int ufs_advlock(void *);
|
||||
int ufs_bmap(void *);
|
||||
int ufs_close(void *);
|
||||
int ufs_create(void *);
|
||||
int ufs_getattr(void *);
|
||||
int ufs_inactive(void *);
|
||||
#define ufs_fcntl genfs_fcntl
|
||||
#define ufs_ioctl genfs_enoioctl
|
||||
#define ufs_islocked genfs_islocked
|
||||
#define ufs_lease_check genfs_lease_check
|
||||
int ufs_link __P((void *));
|
||||
int ufs_link(void *);
|
||||
#define ufs_lock genfs_lock
|
||||
int ufs_lookup __P((void *));
|
||||
int ufs_mkdir __P((void *));
|
||||
int ufs_mknod __P((void *));
|
||||
int ufs_lookup(void *);
|
||||
int ufs_mkdir(void *);
|
||||
int ufs_mknod(void *);
|
||||
#define ufs_mmap genfs_mmap
|
||||
#define ufs_revoke genfs_revoke
|
||||
int ufs_open __P((void *));
|
||||
int ufs_pathconf __P((void *));
|
||||
int ufs_print __P((void *));
|
||||
int ufs_readdir __P((void *));
|
||||
int ufs_readlink __P((void *));
|
||||
int ufs_remove __P((void *));
|
||||
int ufs_rename __P((void *));
|
||||
int ufs_rmdir __P((void *));
|
||||
int ufs_open(void *);
|
||||
int ufs_pathconf(void *);
|
||||
int ufs_print(void *);
|
||||
int ufs_readdir(void *);
|
||||
int ufs_readlink(void *);
|
||||
int ufs_remove(void *);
|
||||
int ufs_rename(void *);
|
||||
int ufs_rmdir(void *);
|
||||
#define ufs_seek genfs_seek
|
||||
#define ufs_poll genfs_poll
|
||||
int ufs_setattr __P((void *));
|
||||
int ufs_strategy __P((void *));
|
||||
int ufs_symlink __P((void *));
|
||||
int ufs_setattr(void *);
|
||||
int ufs_strategy(void *);
|
||||
int ufs_symlink(void *);
|
||||
#define ufs_unlock genfs_unlock
|
||||
int ufs_whiteout __P((void *));
|
||||
int ufsspec_close __P((void *));
|
||||
int ufsspec_read __P((void *));
|
||||
int ufsspec_write __P((void *));
|
||||
int ufs_whiteout(void *);
|
||||
int ufsspec_close(void *);
|
||||
int ufsspec_read(void *);
|
||||
int ufsspec_write(void *);
|
||||
|
||||
int ufsfifo_read __P((void *));
|
||||
int ufsfifo_write __P((void *));
|
||||
int ufsfifo_close __P((void *));
|
||||
int ufsfifo_read(void *);
|
||||
int ufsfifo_write(void *);
|
||||
int ufsfifo_close(void *);
|
||||
|
||||
/* ufs_bmap.c */
|
||||
typedef boolean_t (*ufs_issequential_callback_t) __P((const struct ufsmount *,
|
||||
daddr_t, daddr_t));
|
||||
int ufs_bmaparray __P((struct vnode *, daddr_t, daddr_t *, struct indir *,
|
||||
int *, int *, ufs_issequential_callback_t));
|
||||
int ufs_getlbns __P((struct vnode *, daddr_t, struct indir *, int *));
|
||||
typedef boolean_t (*ufs_issequential_callback_t)(const struct ufsmount *,
|
||||
daddr_t, daddr_t);
|
||||
int ufs_bmaparray(struct vnode *, daddr_t, daddr_t *, struct indir *,
|
||||
int *, int *, ufs_issequential_callback_t);
|
||||
int ufs_getlbns(struct vnode *, daddr_t, struct indir *, int *);
|
||||
|
||||
/* ufs_ihash.c */
|
||||
void ufs_ihashinit __P((void));
|
||||
void ufs_ihashreinit __P((void));
|
||||
void ufs_ihashdone __P((void));
|
||||
struct vnode *ufs_ihashlookup __P((dev_t, ino_t));
|
||||
struct vnode *ufs_ihashget __P((dev_t, ino_t, int));
|
||||
void ufs_ihashins __P((struct inode *));
|
||||
void ufs_ihashrem __P((struct inode *));
|
||||
void ufs_ihashinit(void);
|
||||
void ufs_ihashreinit(void);
|
||||
void ufs_ihashdone(void);
|
||||
struct vnode *ufs_ihashlookup(dev_t, ino_t);
|
||||
struct vnode *ufs_ihashget(dev_t, ino_t, int);
|
||||
void ufs_ihashins(struct inode *);
|
||||
void ufs_ihashrem(struct inode *);
|
||||
|
||||
/* ufs_inode.c */
|
||||
int ufs_reclaim __P((struct vnode *, struct proc *));
|
||||
int ufs_balloc_range __P((struct vnode *, off_t, off_t, struct ucred *, int));
|
||||
int ufs_reclaim(struct vnode *, struct proc *);
|
||||
int ufs_balloc_range(struct vnode *, off_t, off_t, struct ucred *, int);
|
||||
|
||||
/* ufs_lookup.c */
|
||||
void ufs_dirbad __P((struct inode *, doff_t, const char *));
|
||||
int ufs_dirbadentry __P((struct vnode *, struct direct *, int));
|
||||
void ufs_makedirentry __P((struct inode *, struct componentname *,
|
||||
struct direct *));
|
||||
int ufs_direnter __P((struct vnode *, struct vnode *, struct direct *,
|
||||
struct componentname *, struct buf *));
|
||||
int ufs_dirremove __P((struct vnode *, struct inode *, int, int));
|
||||
int ufs_dirrewrite __P((struct inode *, struct inode *, ino_t, int, int, int));
|
||||
int ufs_dirempty __P((struct inode *, ino_t, struct ucred *));
|
||||
int ufs_checkpath __P((struct inode *, struct inode *, struct ucred *));
|
||||
void ufs_dirbad(struct inode *, doff_t, const char *);
|
||||
int ufs_dirbadentry(struct vnode *, struct direct *, int);
|
||||
void ufs_makedirentry(struct inode *, struct componentname *,
|
||||
struct direct *);
|
||||
int ufs_direnter(struct vnode *, struct vnode *, struct direct *,
|
||||
struct componentname *, struct buf *);
|
||||
int ufs_dirremove(struct vnode *, struct inode *, int, int);
|
||||
int ufs_dirrewrite(struct inode *, struct inode *, ino_t, int, int, int);
|
||||
int ufs_dirempty(struct inode *, ino_t, struct ucred *);
|
||||
int ufs_checkpath(struct inode *, struct inode *, struct ucred *);
|
||||
|
||||
/* ufs_quota.c */
|
||||
int getinoquota __P((struct inode *));
|
||||
int chkdq __P((struct inode *, int64_t, struct ucred *, int));
|
||||
int chkdqchg __P((struct inode *, int64_t, struct ucred *, int));
|
||||
int chkiq __P((struct inode *, int32_t, struct ucred *, int));
|
||||
int chkiqchg __P((struct inode *, int32_t, struct ucred *, int));
|
||||
void chkdquot __P((struct inode *));
|
||||
int quotaon __P((struct proc *, struct mount *, int, caddr_t));
|
||||
int quotaoff __P((struct proc *, struct mount *, int));
|
||||
int getquota __P((struct mount *, u_long, int, caddr_t));
|
||||
int setquota __P((struct mount *, u_long, int, caddr_t));
|
||||
int setuse __P((struct mount *, u_long, int, caddr_t));
|
||||
int qsync __P((struct mount *));
|
||||
int dqget __P((struct vnode *, u_long, struct ufsmount *, int,
|
||||
struct dquot **));
|
||||
void dqref __P((struct dquot *));
|
||||
void dqrele __P((struct vnode *, struct dquot *));
|
||||
int dqsync __P((struct vnode *, struct dquot *));
|
||||
void dqflush __P((struct vnode *));
|
||||
int getinoquota(struct inode *);
|
||||
int chkdq(struct inode *, int64_t, struct ucred *, int);
|
||||
int chkdqchg(struct inode *, int64_t, struct ucred *, int);
|
||||
int chkiq(struct inode *, int32_t, struct ucred *, int);
|
||||
int chkiqchg(struct inode *, int32_t, struct ucred *, int);
|
||||
void chkdquot(struct inode *);
|
||||
int quotaon(struct proc *, struct mount *, int, caddr_t);
|
||||
int quotaoff(struct proc *, struct mount *, int);
|
||||
int getquota(struct mount *, u_long, int, caddr_t);
|
||||
int setquota(struct mount *, u_long, int, caddr_t);
|
||||
int setuse(struct mount *, u_long, int, caddr_t);
|
||||
int qsync(struct mount *);
|
||||
int dqget(struct vnode *, u_long, struct ufsmount *, int, struct dquot **);
|
||||
void dqref(struct dquot *);
|
||||
void dqrele(struct vnode *, struct dquot *);
|
||||
int dqsync(struct vnode *, struct dquot *);
|
||||
void dqflush(struct vnode *);
|
||||
|
||||
/* ufs_vfsops.c */
|
||||
void ufs_init __P((void));
|
||||
void ufs_reinit __P((void));
|
||||
void ufs_done __P((void));
|
||||
int ufs_start __P((struct mount *, int, struct proc *));
|
||||
int ufs_root __P((struct mount *, struct vnode **));
|
||||
int ufs_quotactl __P((struct mount *, int, uid_t, void *, struct proc *));
|
||||
int ufs_fhtovp __P((struct mount *, struct ufid *, struct vnode **));
|
||||
int ufs_check_export __P((struct mount *, struct mbuf *, int *,
|
||||
struct ucred **));
|
||||
void ufs_init(void);
|
||||
void ufs_reinit(void);
|
||||
void ufs_done(void);
|
||||
int ufs_start(struct mount *, int, struct proc *);
|
||||
int ufs_root(struct mount *, struct vnode **);
|
||||
int ufs_quotactl(struct mount *, int, uid_t, void *, struct proc *);
|
||||
int ufs_fhtovp(struct mount *, struct ufid *, struct vnode **);
|
||||
int ufs_check_export(struct mount *, struct mbuf *, int *, struct ucred **);
|
||||
|
||||
/* ufs_vnops.c */
|
||||
void ufs_vinit __P((struct mount *, int (**) __P((void *)),
|
||||
int (**) __P((void *)), struct vnode **));
|
||||
int ufs_makeinode __P((int, struct vnode *, struct vnode **,
|
||||
struct componentname *));
|
||||
int ufs_gop_alloc __P((struct vnode *, off_t, off_t, int, struct ucred *));
|
||||
void ufs_vinit(struct mount *, int (**)(void *),
|
||||
int (**)(void *), struct vnode **);
|
||||
int ufs_makeinode(int, struct vnode *, struct vnode **,
|
||||
struct componentname *);
|
||||
int ufs_gop_alloc(struct vnode *, off_t, off_t, int, struct ucred *);
|
||||
|
||||
/*
|
||||
* Snapshot function prototypes.
|
||||
@ -178,16 +176,15 @@ void ffs_snapgone(struct inode *);
|
||||
/*
|
||||
* Soft dependency function prototypes.
|
||||
*/
|
||||
int softdep_setup_directory_add __P((struct buf *, struct inode *, off_t,
|
||||
ino_t, struct buf *, int));
|
||||
void softdep_change_directoryentry_offset __P((struct inode *, caddr_t,
|
||||
caddr_t, caddr_t, int));
|
||||
void softdep_setup_remove __P((struct buf *,struct inode *, struct inode *,
|
||||
int));
|
||||
void softdep_setup_directory_change __P((struct buf *, struct inode *,
|
||||
struct inode *, ino_t, int));
|
||||
void softdep_change_linkcnt __P((struct inode *));
|
||||
void softdep_releasefile __P((struct inode *));
|
||||
int softdep_setup_directory_add(struct buf *, struct inode *, off_t,
|
||||
ino_t, struct buf *, int);
|
||||
void softdep_change_directoryentry_offset(struct inode *, caddr_t,
|
||||
caddr_t, caddr_t, int);
|
||||
void softdep_setup_remove(struct buf *, struct inode *, struct inode *, int);
|
||||
void softdep_setup_directory_change(struct buf *, struct inode *,
|
||||
struct inode *, ino_t, int);
|
||||
void softdep_change_linkcnt(struct inode *);
|
||||
void softdep_releasefile(struct inode *);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ufs_ihash.c,v 1.18 2003/08/07 16:34:45 agc Exp $ */
|
||||
/* $NetBSD: ufs_ihash.c,v 1.19 2005/07/10 00:18:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1991, 1993
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_ihash.c,v 1.18 2003/08/07 16:34:45 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_ihash.c,v 1.19 2005/07/10 00:18:52 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -47,8 +47,8 @@ __KERNEL_RCSID(0, "$NetBSD: ufs_ihash.c,v 1.18 2003/08/07 16:34:45 agc Exp $");
|
||||
/*
|
||||
* Structures associated with inode cacheing.
|
||||
*/
|
||||
LIST_HEAD(ihashhead, inode) *ihashtbl;
|
||||
u_long ihash; /* size of hash table - 1 */
|
||||
static LIST_HEAD(ihashhead, inode) *ihashtbl;
|
||||
static u_long ihash; /* size of hash table - 1 */
|
||||
#define INOHASH(device, inum) (((device) + (inum)) & ihash)
|
||||
|
||||
struct lock ufs_hashlock;
|
||||
@ -58,7 +58,7 @@ struct simplelock ufs_ihash_slock;
|
||||
* Initialize inode hash table.
|
||||
*/
|
||||
void
|
||||
ufs_ihashinit()
|
||||
ufs_ihashinit(void)
|
||||
{
|
||||
lockinit(&ufs_hashlock, PINOD, "ufs_hashlock", 0, 0);
|
||||
ihashtbl =
|
||||
@ -71,7 +71,7 @@ ufs_ihashinit()
|
||||
*/
|
||||
|
||||
void
|
||||
ufs_ihashreinit()
|
||||
ufs_ihashreinit(void)
|
||||
{
|
||||
struct inode *ip;
|
||||
struct ihashhead *oldhash, *hash;
|
||||
@ -99,7 +99,7 @@ ufs_ihashreinit()
|
||||
* Free inode hash table.
|
||||
*/
|
||||
void
|
||||
ufs_ihashdone()
|
||||
ufs_ihashdone(void)
|
||||
{
|
||||
hashdone(ihashtbl, M_UFSMNT);
|
||||
}
|
||||
@ -109,9 +109,7 @@ ufs_ihashdone()
|
||||
* to it. If it is in core, return it, even if it is locked.
|
||||
*/
|
||||
struct vnode *
|
||||
ufs_ihashlookup(dev, inum)
|
||||
dev_t dev;
|
||||
ino_t inum;
|
||||
ufs_ihashlookup(dev_t dev, ino_t inum)
|
||||
{
|
||||
struct inode *ip;
|
||||
struct ihashhead *ipp;
|
||||
@ -133,10 +131,7 @@ ufs_ihashlookup(dev, inum)
|
||||
* to it. If it is in core, but locked, wait for it.
|
||||
*/
|
||||
struct vnode *
|
||||
ufs_ihashget(dev, inum, flags)
|
||||
dev_t dev;
|
||||
ino_t inum;
|
||||
int flags;
|
||||
ufs_ihashget(dev_t dev, ino_t inum, int flags)
|
||||
{
|
||||
struct ihashhead *ipp;
|
||||
struct inode *ip;
|
||||
@ -163,8 +158,7 @@ loop:
|
||||
* Insert the inode into the hash table, and return it locked.
|
||||
*/
|
||||
void
|
||||
ufs_ihashins(ip)
|
||||
struct inode *ip;
|
||||
ufs_ihashins(struct inode *ip)
|
||||
{
|
||||
struct ihashhead *ipp;
|
||||
|
||||
@ -181,8 +175,7 @@ ufs_ihashins(ip)
|
||||
* Remove the inode from the hash table.
|
||||
*/
|
||||
void
|
||||
ufs_ihashrem(ip)
|
||||
struct inode *ip;
|
||||
ufs_ihashrem(struct inode *ip)
|
||||
{
|
||||
simple_lock(&ufs_ihash_slock);
|
||||
LIST_REMOVE(ip, i_hash);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ufs_inode.c,v 1.47 2005/01/23 19:37:05 rumble Exp $ */
|
||||
/* $NetBSD: ufs_inode.c,v 1.48 2005/07/10 00:18:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.47 2005/01/23 19:37:05 rumble Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.48 2005/07/10 00:18:52 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_quota.h"
|
||||
@ -67,8 +67,7 @@ extern int prtactive;
|
||||
* Last reference to an inode. If necessary, write or delete it.
|
||||
*/
|
||||
int
|
||||
ufs_inactive(v)
|
||||
void *v;
|
||||
ufs_inactive(void *v)
|
||||
{
|
||||
struct vop_inactive_args /* {
|
||||
struct vnode *a_vp;
|
||||
@ -139,9 +138,7 @@ out:
|
||||
* Reclaim an inode so that it can be used for other purposes.
|
||||
*/
|
||||
int
|
||||
ufs_reclaim(vp, p)
|
||||
struct vnode *vp;
|
||||
struct proc *p;
|
||||
ufs_reclaim(struct vnode *vp, struct proc *p)
|
||||
{
|
||||
struct inode *ip = VTOI(vp);
|
||||
struct mount *mp;
|
||||
@ -191,11 +188,8 @@ ufs_reclaim(vp, p)
|
||||
*/
|
||||
|
||||
int
|
||||
ufs_balloc_range(vp, off, len, cred, flags)
|
||||
struct vnode *vp;
|
||||
off_t off, len;
|
||||
struct ucred *cred;
|
||||
int flags;
|
||||
ufs_balloc_range(struct vnode *vp, off_t off, off_t len, struct ucred *cred,
|
||||
int flags)
|
||||
{
|
||||
off_t oldeof, neweof, oldeob, oldeop, neweob, pagestart;
|
||||
struct uvm_object *uobj;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ufs_lookup.c,v 1.63 2005/05/29 21:25:24 christos Exp $ */
|
||||
/* $NetBSD: ufs_lookup.c,v 1.64 2005/07/10 00:18:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.63 2005/05/29 21:25:24 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.64 2005/07/10 00:18:52 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -100,8 +100,7 @@ int dirchk = 0;
|
||||
* nor deleting, add name to cache
|
||||
*/
|
||||
int
|
||||
ufs_lookup(v)
|
||||
void *v;
|
||||
ufs_lookup(void *v)
|
||||
{
|
||||
struct vop_lookup_args /* {
|
||||
struct vnode *a_dvp;
|
||||
@ -648,10 +647,7 @@ found:
|
||||
}
|
||||
|
||||
void
|
||||
ufs_dirbad(ip, offset, how)
|
||||
struct inode *ip;
|
||||
doff_t offset;
|
||||
const char *how;
|
||||
ufs_dirbad(struct inode *ip, doff_t offset, const char *how)
|
||||
{
|
||||
struct mount *mp;
|
||||
|
||||
@ -671,10 +667,7 @@ ufs_dirbad(ip, offset, how)
|
||||
* name must be as long as advertised, and null terminated
|
||||
*/
|
||||
int
|
||||
ufs_dirbadentry(dp, ep, entryoffsetinblock)
|
||||
struct vnode *dp;
|
||||
struct direct *ep;
|
||||
int entryoffsetinblock;
|
||||
ufs_dirbadentry(struct vnode *dp, struct direct *ep, int entryoffsetinblock)
|
||||
{
|
||||
int i;
|
||||
int namlen;
|
||||
@ -728,10 +721,8 @@ bad:
|
||||
* argument ip is the inode to which the new directory entry will refer.
|
||||
*/
|
||||
void
|
||||
ufs_makedirentry(ip, cnp, newdirp)
|
||||
struct inode *ip;
|
||||
struct componentname *cnp;
|
||||
struct direct *newdirp;
|
||||
ufs_makedirentry(struct inode *ip, struct componentname *cnp,
|
||||
struct direct *newdirp)
|
||||
{
|
||||
#ifdef DIAGNOSTIC
|
||||
if ((cnp->cn_flags & SAVENAME) == 0)
|
||||
@ -757,12 +748,8 @@ ufs_makedirentry(ip, cnp, newdirp)
|
||||
* soft dependency code).
|
||||
*/
|
||||
int
|
||||
ufs_direnter(dvp, tvp, dirp, cnp, newdirbp)
|
||||
struct vnode *dvp;
|
||||
struct vnode *tvp;
|
||||
struct direct *dirp;
|
||||
struct componentname *cnp;
|
||||
struct buf *newdirbp;
|
||||
ufs_direnter(struct vnode *dvp, struct vnode *tvp, struct direct *dirp,
|
||||
struct componentname *cnp, struct buf *newdirbp)
|
||||
{
|
||||
struct ucred *cr;
|
||||
struct proc *p;
|
||||
@ -1028,11 +1015,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp)
|
||||
* to the size of the previous entry.
|
||||
*/
|
||||
int
|
||||
ufs_dirremove(dvp, ip, flags, isrmdir)
|
||||
struct vnode *dvp;
|
||||
struct inode *ip;
|
||||
int flags;
|
||||
int isrmdir;
|
||||
ufs_dirremove(struct vnode *dvp, struct inode *ip, int flags, int isrmdir)
|
||||
{
|
||||
struct inode *dp = VTOI(dvp);
|
||||
struct direct *ep;
|
||||
@ -1127,12 +1110,8 @@ out:
|
||||
* set up by a call to namei.
|
||||
*/
|
||||
int
|
||||
ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir, iflags)
|
||||
struct inode *dp, *oip;
|
||||
ino_t newinum;
|
||||
int newtype;
|
||||
int isrmdir;
|
||||
int iflags;
|
||||
ufs_dirrewrite(struct inode *dp, struct inode *oip, ino_t newinum, int newtype,
|
||||
int isrmdir, int iflags)
|
||||
{
|
||||
struct buf *bp;
|
||||
struct direct *ep;
|
||||
@ -1177,10 +1156,7 @@ ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir, iflags)
|
||||
* NB: does not handle corrupted directories.
|
||||
*/
|
||||
int
|
||||
ufs_dirempty(ip, parentino, cred)
|
||||
struct inode *ip;
|
||||
ino_t parentino;
|
||||
struct ucred *cred;
|
||||
ufs_dirempty(struct inode *ip, ino_t parentino, struct ucred *cred)
|
||||
{
|
||||
doff_t off;
|
||||
struct dirtemplate dbuf;
|
||||
@ -1244,9 +1220,7 @@ ufs_dirempty(ip, parentino, cred)
|
||||
* The target is always vput before returning.
|
||||
*/
|
||||
int
|
||||
ufs_checkpath(source, target, cred)
|
||||
struct inode *source, *target;
|
||||
struct ucred *cred;
|
||||
ufs_checkpath(struct inode *source, struct inode *target, struct ucred *cred)
|
||||
{
|
||||
struct vnode *vp = ITOV(target);
|
||||
int error, rootino, namlen;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ufs_quota.c,v 1.34 2005/05/29 21:25:24 christos Exp $ */
|
||||
/* $NetBSD: ufs_quota.c,v 1.35 2005/07/10 00:18:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993, 1995
|
||||
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.34 2005/05/29 21:25:24 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.35 2005/07/10 00:18:52 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -66,8 +66,7 @@ static const char *quotatypes[] = INITQFNAMES;
|
||||
* additional dquots set up here.
|
||||
*/
|
||||
int
|
||||
getinoquota(ip)
|
||||
struct inode *ip;
|
||||
getinoquota(struct inode *ip)
|
||||
{
|
||||
struct ufsmount *ump = ip->i_ump;
|
||||
struct vnode *vp = ITOV(ip);
|
||||
@ -98,11 +97,7 @@ getinoquota(ip)
|
||||
* Update disk usage, and take corrective action.
|
||||
*/
|
||||
int
|
||||
chkdq(ip, change, cred, flags)
|
||||
struct inode *ip;
|
||||
int64_t change;
|
||||
struct ucred *cred;
|
||||
int flags;
|
||||
chkdq(struct inode *ip, int64_t change, struct ucred *cred, int flags)
|
||||
{
|
||||
struct dquot *dq;
|
||||
int i;
|
||||
@ -159,11 +154,7 @@ chkdq(ip, change, cred, flags)
|
||||
* Issue an error message if appropriate.
|
||||
*/
|
||||
int
|
||||
chkdqchg(ip, change, cred, type)
|
||||
struct inode *ip;
|
||||
int64_t change;
|
||||
struct ucred *cred;
|
||||
int type;
|
||||
chkdqchg(struct inode *ip, int64_t change, struct ucred *cred, int type)
|
||||
{
|
||||
struct dquot *dq = ip->i_dquot[type];
|
||||
long ncurblocks = dq->dq_curblocks + change;
|
||||
@ -213,11 +204,7 @@ chkdqchg(ip, change, cred, type)
|
||||
* Check the inode limit, applying corrective action.
|
||||
*/
|
||||
int
|
||||
chkiq(ip, change, cred, flags)
|
||||
struct inode *ip;
|
||||
int32_t change;
|
||||
struct ucred *cred;
|
||||
int flags;
|
||||
chkiq(struct inode *ip, int32_t change, struct ucred *cred, int flags)
|
||||
{
|
||||
struct dquot *dq;
|
||||
int i;
|
||||
@ -273,11 +260,7 @@ chkiq(ip, change, cred, flags)
|
||||
* Issue an error message if appropriate.
|
||||
*/
|
||||
int
|
||||
chkiqchg(ip, change, cred, type)
|
||||
struct inode *ip;
|
||||
int32_t change;
|
||||
struct ucred *cred;
|
||||
int type;
|
||||
chkiqchg(struct inode *ip, int32_t change, struct ucred *cred, int type)
|
||||
{
|
||||
struct dquot *dq = ip->i_dquot[type];
|
||||
long ncurinodes = dq->dq_curinodes + change;
|
||||
@ -329,8 +312,7 @@ chkiqchg(ip, change, cred, type)
|
||||
* size and not to have a dquot structure associated with it.
|
||||
*/
|
||||
void
|
||||
chkdquot(ip)
|
||||
struct inode *ip;
|
||||
chkdquot(struct inode *ip)
|
||||
{
|
||||
struct ufsmount *ump = ip->i_ump;
|
||||
int i;
|
||||
@ -355,11 +337,7 @@ chkdquot(ip)
|
||||
* Q_QUOTAON - set up a quota file for a particular file system.
|
||||
*/
|
||||
int
|
||||
quotaon(p, mp, type, fname)
|
||||
struct proc *p;
|
||||
struct mount *mp;
|
||||
int type;
|
||||
caddr_t fname;
|
||||
quotaon(struct proc *p, struct mount *mp, int type, caddr_t fname)
|
||||
{
|
||||
struct ufsmount *ump = VFSTOUFS(mp);
|
||||
struct vnode *vp, **vpp;
|
||||
@ -429,10 +407,7 @@ again:
|
||||
* Q_QUOTAOFF - turn off disk quotas for a filesystem.
|
||||
*/
|
||||
int
|
||||
quotaoff(p, mp, type)
|
||||
struct proc *p;
|
||||
struct mount *mp;
|
||||
int type;
|
||||
quotaoff(struct proc *p, struct mount *mp, int type)
|
||||
{
|
||||
struct vnode *vp;
|
||||
struct vnode *qvp, *nextvp;
|
||||
@ -482,11 +457,7 @@ again:
|
||||
* Q_GETQUOTA - return current values in a dqblk structure.
|
||||
*/
|
||||
int
|
||||
getquota(mp, id, type, addr)
|
||||
struct mount *mp;
|
||||
u_long id;
|
||||
int type;
|
||||
caddr_t addr;
|
||||
getquota(struct mount *mp, u_long id, int type, caddr_t addr)
|
||||
{
|
||||
struct dquot *dq;
|
||||
int error;
|
||||
@ -502,11 +473,7 @@ getquota(mp, id, type, addr)
|
||||
* Q_SETQUOTA - assign an entire dqblk structure.
|
||||
*/
|
||||
int
|
||||
setquota(mp, id, type, addr)
|
||||
struct mount *mp;
|
||||
u_long id;
|
||||
int type;
|
||||
caddr_t addr;
|
||||
setquota(struct mount *mp, u_long id, int type, caddr_t addr)
|
||||
{
|
||||
struct dquot *dq;
|
||||
struct dquot *ndq;
|
||||
@ -562,11 +529,7 @@ setquota(mp, id, type, addr)
|
||||
* Q_SETUSE - set current inode and block usage.
|
||||
*/
|
||||
int
|
||||
setuse(mp, id, type, addr)
|
||||
struct mount *mp;
|
||||
u_long id;
|
||||
int type;
|
||||
caddr_t addr;
|
||||
setuse(struct mount *mp, u_long id, int type, caddr_t addr)
|
||||
{
|
||||
struct dquot *dq;
|
||||
struct ufsmount *ump = VFSTOUFS(mp);
|
||||
@ -609,8 +572,7 @@ setuse(mp, id, type, addr)
|
||||
* Q_SYNC - sync quota files to disk.
|
||||
*/
|
||||
int
|
||||
qsync(mp)
|
||||
struct mount *mp;
|
||||
qsync(struct mount *mp)
|
||||
{
|
||||
struct ufsmount *ump = VFSTOUFS(mp);
|
||||
struct vnode *vp, *nextvp;
|
||||
@ -666,15 +628,15 @@ again:
|
||||
*/
|
||||
#define DQHASH(dqvp, id) \
|
||||
(((((long)(dqvp)) >> 8) + id) & dqhash)
|
||||
LIST_HEAD(dqhashhead, dquot) *dqhashtbl;
|
||||
u_long dqhash;
|
||||
static LIST_HEAD(dqhashhead, dquot) *dqhashtbl;
|
||||
static u_long dqhash;
|
||||
|
||||
/*
|
||||
* Dquot free list.
|
||||
*/
|
||||
#define DQUOTINC 5 /* minimum free dquots desired */
|
||||
TAILQ_HEAD(dqfreelist, dquot) dqfreelist;
|
||||
long numdquot, desireddquot = DQUOTINC;
|
||||
static TAILQ_HEAD(dqfreelist, dquot) dqfreelist;
|
||||
static long numdquot, desireddquot = DQUOTINC;
|
||||
|
||||
MALLOC_DEFINE(M_DQUOT, "UFS quota", "UFS quota entries");
|
||||
|
||||
@ -682,7 +644,7 @@ MALLOC_DEFINE(M_DQUOT, "UFS quota", "UFS quota entries");
|
||||
* Initialize the quota system.
|
||||
*/
|
||||
void
|
||||
dqinit()
|
||||
dqinit(void)
|
||||
{
|
||||
dqhashtbl =
|
||||
hashinit(desiredvnodes, HASH_LIST, M_DQUOT, M_WAITOK, &dqhash);
|
||||
@ -690,7 +652,7 @@ dqinit()
|
||||
}
|
||||
|
||||
void
|
||||
dqreinit()
|
||||
dqreinit(void)
|
||||
{
|
||||
struct dquot *dq;
|
||||
struct dqhashhead *oldhash, *hash;
|
||||
@ -718,7 +680,7 @@ dqreinit()
|
||||
* Free resources held by quota system.
|
||||
*/
|
||||
void
|
||||
dqdone()
|
||||
dqdone(void)
|
||||
{
|
||||
hashdone(dqhashtbl, M_DQUOT);
|
||||
}
|
||||
@ -728,12 +690,8 @@ dqdone()
|
||||
* reading the information from the file if necessary.
|
||||
*/
|
||||
int
|
||||
dqget(vp, id, ump, type, dqp)
|
||||
struct vnode *vp;
|
||||
u_long id;
|
||||
struct ufsmount *ump;
|
||||
int type;
|
||||
struct dquot **dqp;
|
||||
dqget(struct vnode *vp, u_long id, struct ufsmount *ump, int type,
|
||||
struct dquot **dqp)
|
||||
{
|
||||
struct dquot *dq;
|
||||
struct dqhashhead *dqh;
|
||||
@ -846,8 +804,7 @@ dqget(vp, id, ump, type, dqp)
|
||||
* Obtain a reference to a dquot.
|
||||
*/
|
||||
void
|
||||
dqref(dq)
|
||||
struct dquot *dq;
|
||||
dqref(struct dquot *dq)
|
||||
{
|
||||
|
||||
dq->dq_cnt++;
|
||||
@ -857,9 +814,7 @@ dqref(dq)
|
||||
* Release a reference to a dquot.
|
||||
*/
|
||||
void
|
||||
dqrele(vp, dq)
|
||||
struct vnode *vp;
|
||||
struct dquot *dq;
|
||||
dqrele(struct vnode *vp, struct dquot *dq)
|
||||
{
|
||||
|
||||
if (dq == NODQUOT)
|
||||
@ -879,9 +834,7 @@ dqrele(vp, dq)
|
||||
* Update the disk quota in the quota file.
|
||||
*/
|
||||
int
|
||||
dqsync(vp, dq)
|
||||
struct vnode *vp;
|
||||
struct dquot *dq;
|
||||
dqsync(struct vnode *vp, struct dquot *dq)
|
||||
{
|
||||
struct vnode *dqvp;
|
||||
struct mount *mp;
|
||||
@ -934,8 +887,7 @@ dqsync(vp, dq)
|
||||
* Flush all entries from the cache for a particular vnode.
|
||||
*/
|
||||
void
|
||||
dqflush(vp)
|
||||
struct vnode *vp;
|
||||
dqflush(struct vnode *vp)
|
||||
{
|
||||
struct dquot *dq, *nextdq;
|
||||
struct dqhashhead *dqh;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ufs_vfsops.c,v 1.22 2005/01/23 19:37:05 rumble Exp $ */
|
||||
/* $NetBSD: ufs_vfsops.c,v 1.23 2005/07/10 00:18:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993, 1994
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_vfsops.c,v 1.22 2005/01/23 19:37:05 rumble Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ufs_vfsops.c,v 1.23 2005/07/10 00:18:52 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_quota.h"
|
||||
@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: ufs_vfsops.c,v 1.22 2005/01/23 19:37:05 rumble Exp $
|
||||
#endif
|
||||
|
||||
/* how many times ufs_init() was called */
|
||||
int ufs_initcount = 0;
|
||||
static int ufs_initcount = 0;
|
||||
|
||||
POOL_INIT(ufs_direct_pool, sizeof(struct direct), 0, 0, 0, "ufsdirpl",
|
||||
&pool_allocator_nointr);
|
||||
@ -73,10 +73,7 @@ POOL_INIT(ufs_direct_pool, sizeof(struct direct), 0, 0, 0, "ufsdirpl",
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
ufs_start(mp, flags, p)
|
||||
struct mount *mp;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
ufs_start(struct mount *mp, int flags, struct proc *p)
|
||||
{
|
||||
|
||||
return (0);
|
||||
@ -86,9 +83,7 @@ ufs_start(mp, flags, p)
|
||||
* Return the root of a filesystem.
|
||||
*/
|
||||
int
|
||||
ufs_root(mp, vpp)
|
||||
struct mount *mp;
|
||||
struct vnode **vpp;
|
||||
ufs_root(struct mount *mp, struct vnode **vpp)
|
||||
{
|
||||
struct vnode *nvp;
|
||||
int error;
|
||||
@ -103,12 +98,7 @@ ufs_root(mp, vpp)
|
||||
* Do operations associated with quotas
|
||||
*/
|
||||
int
|
||||
ufs_quotactl(mp, cmds, uid, arg, p)
|
||||
struct mount *mp;
|
||||
int cmds;
|
||||
uid_t uid;
|
||||
void *arg;
|
||||
struct proc *p;
|
||||
ufs_quotactl(struct mount *mp, int cmds, uid_t uid, void *arg, struct proc *p)
|
||||
{
|
||||
|
||||
#ifndef QUOTA
|
||||
@ -177,11 +167,8 @@ ufs_quotactl(mp, cmds, uid, arg, p)
|
||||
* exflagsp and credanonp.
|
||||
*/
|
||||
int
|
||||
ufs_check_export(mp, nam, exflagsp, credanonp)
|
||||
struct mount *mp;
|
||||
struct mbuf *nam;
|
||||
int *exflagsp;
|
||||
struct ucred **credanonp;
|
||||
ufs_check_export(struct mount *mp, struct mbuf *nam, int *exflagsp,
|
||||
struct ucred **credanonp)
|
||||
{
|
||||
struct netcred *np;
|
||||
struct ufsmount *ump = VFSTOUFS(mp);
|
||||
@ -203,10 +190,7 @@ ufs_check_export(mp, nam, exflagsp, credanonp)
|
||||
* filesystem has validated the file handle.
|
||||
*/
|
||||
int
|
||||
ufs_fhtovp(mp, ufhp, vpp)
|
||||
struct mount *mp;
|
||||
struct ufid *ufhp;
|
||||
struct vnode **vpp;
|
||||
ufs_fhtovp(struct mount *mp, struct ufid *ufhp, struct vnode **vpp)
|
||||
{
|
||||
struct vnode *nvp;
|
||||
struct inode *ip;
|
||||
@ -230,7 +214,7 @@ ufs_fhtovp(mp, ufhp, vpp)
|
||||
* Initialize UFS filesystems, done only once.
|
||||
*/
|
||||
void
|
||||
ufs_init()
|
||||
ufs_init(void)
|
||||
{
|
||||
if (ufs_initcount++ > 0)
|
||||
return;
|
||||
@ -250,7 +234,7 @@ ufs_init()
|
||||
}
|
||||
|
||||
void
|
||||
ufs_reinit()
|
||||
ufs_reinit(void)
|
||||
{
|
||||
ufs_ihashreinit();
|
||||
#ifdef QUOTA
|
||||
@ -262,7 +246,7 @@ ufs_reinit()
|
||||
* Free UFS filesystem resources, done only once.
|
||||
*/
|
||||
void
|
||||
ufs_done()
|
||||
ufs_done(void)
|
||||
{
|
||||
if (--ufs_initcount > 0)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user