VFS interior redecoration.
Rename vn_default_error to vop_defaultop all over the place. Move vn_bwrite from vfs_bio.c to vfs_default.c and call it vop_stdbwrite. Use vop_null instead of nullop. Move vop_nopoll from vfs_subr.c to vfs_default.c Move vop_sharedlock from vfs_subr.c to vfs_default.c Move vop_nolock from vfs_subr.c to vfs_default.c Move vop_nounlock from vfs_subr.c to vfs_default.c Move vop_noislocked from vfs_subr.c to vfs_default.c Use vop_ebadf instead of *_ebadf. Add vop_defaultop for getpages on master vnode in MFS.
This commit is contained in:
parent
e83f76772d
commit
dba3870c10
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30743
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)cd9660_vnops.c 8.19 (Berkeley) 5/27/95
|
||||
* $Id: cd9660_vnops.c,v 1.45 1997/10/16 20:32:21 phk Exp $
|
||||
* $Id: cd9660_vnops.c,v 1.46 1997/10/17 12:36:11 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -812,7 +812,7 @@ cd9660_pathconf(ap)
|
||||
*/
|
||||
vop_t **cd9660_vnodeop_p;
|
||||
struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) cd9660_abortop },
|
||||
{ &vop_access_desc, (vop_t *) cd9660_access },
|
||||
{ &vop_bmap_desc, (vop_t *) cd9660_bmap },
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: dead_vnops.c,v 1.19 1997/10/16 20:32:24 phk Exp $
|
||||
* $Id: dead_vnops.c,v 1.20 1997/10/16 21:59:55 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -45,7 +45,6 @@ static int chkvnlock __P((struct vnode *));
|
||||
* Prototypes for dead operations on vnodes.
|
||||
*/
|
||||
static int dead_badop __P((void));
|
||||
static int dead_ebadf __P((void));
|
||||
static int dead_lookup __P((struct vop_lookup_args *));
|
||||
static int dead_open __P((struct vop_open_args *));
|
||||
static int dead_read __P((struct vop_read_args *));
|
||||
@ -57,13 +56,13 @@ static int dead_print __P((struct vop_print_args *));
|
||||
|
||||
vop_t **dead_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc dead_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_access_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_advlock_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_access_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_advlock_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_bmap_desc, (vop_t *) dead_bmap },
|
||||
{ &vop_create_desc, (vop_t *) dead_badop },
|
||||
{ &vop_getattr_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_inactive_desc, (vop_t *) nullop },
|
||||
{ &vop_getattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_inactive_desc, (vop_t *) vop_null },
|
||||
{ &vop_ioctl_desc, (vop_t *) dead_ioctl },
|
||||
{ &vop_link_desc, (vop_t *) dead_badop },
|
||||
{ &vop_lock_desc, (vop_t *) dead_lock },
|
||||
@ -72,16 +71,16 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = {
|
||||
{ &vop_mknod_desc, (vop_t *) dead_badop },
|
||||
{ &vop_mmap_desc, (vop_t *) dead_badop },
|
||||
{ &vop_open_desc, (vop_t *) dead_open },
|
||||
{ &vop_pathconf_desc, (vop_t *) dead_ebadf }, /* per pathconf(2) */
|
||||
{ &vop_pathconf_desc, (vop_t *) vop_ebadf }, /* per pathconf(2) */
|
||||
{ &vop_print_desc, (vop_t *) dead_print },
|
||||
{ &vop_read_desc, (vop_t *) dead_read },
|
||||
{ &vop_readdir_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_readlink_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_reclaim_desc, (vop_t *) nullop },
|
||||
{ &vop_readdir_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_readlink_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_reclaim_desc, (vop_t *) vop_null },
|
||||
{ &vop_remove_desc, (vop_t *) dead_badop },
|
||||
{ &vop_rename_desc, (vop_t *) dead_badop },
|
||||
{ &vop_rmdir_desc, (vop_t *) dead_badop },
|
||||
{ &vop_setattr_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_setattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_symlink_desc, (vop_t *) dead_badop },
|
||||
{ &vop_write_desc, (vop_t *) dead_write },
|
||||
{ NULL, NULL }
|
||||
@ -260,16 +259,6 @@ dead_print(ap)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Empty vnode failed operation
|
||||
*/
|
||||
static int
|
||||
dead_ebadf()
|
||||
{
|
||||
|
||||
return (EBADF);
|
||||
}
|
||||
|
||||
/*
|
||||
* Empty vnode bad operation
|
||||
*/
|
||||
|
@ -35,7 +35,7 @@
|
||||
*
|
||||
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
|
||||
*
|
||||
* $Id: fdesc_vnops.c,v 1.30 1997/10/16 20:32:25 phk Exp $
|
||||
* $Id: fdesc_vnops.c,v 1.31 1997/10/16 22:00:05 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -856,8 +856,8 @@ fdesc_badop()
|
||||
}
|
||||
|
||||
static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_access_desc, (vop_t *) nullop },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_access_desc, (vop_t *) vop_null },
|
||||
{ &vop_bmap_desc, (vop_t *) fdesc_badop },
|
||||
{ &vop_getattr_desc, (vop_t *) fdesc_getattr },
|
||||
{ &vop_inactive_desc, (vop_t *) fdesc_inactive },
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)fifo_vnops.c 8.10 (Berkeley) 5/27/95
|
||||
* $Id: fifo_vnops.c,v 1.33 1997/10/16 20:32:26 phk Exp $
|
||||
* $Id: fifo_vnops.c,v 1.34 1997/10/16 22:00:12 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -60,7 +60,6 @@ struct fifoinfo {
|
||||
long fi_writers;
|
||||
};
|
||||
|
||||
static int fifo_ebadf __P((void));
|
||||
static int fifo_badop __P((void));
|
||||
static int fifo_print __P((struct vop_print_args *));
|
||||
static int fifo_lookup __P((struct vop_lookup_args *));
|
||||
@ -77,17 +76,17 @@ static int fifo_advlock __P((struct vop_advlock_args *));
|
||||
|
||||
vop_t **fifo_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_access_desc, (vop_t *) fifo_ebadf },
|
||||
{ &vop_access_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_advlock_desc, (vop_t *) fifo_advlock },
|
||||
{ &vop_bmap_desc, (vop_t *) fifo_bmap },
|
||||
{ &vop_close_desc, (vop_t *) fifo_close },
|
||||
{ &vop_create_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_getattr_desc, (vop_t *) fifo_ebadf },
|
||||
{ &vop_getattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_inactive_desc, (vop_t *) fifo_inactive },
|
||||
{ &vop_ioctl_desc, (vop_t *) fifo_ioctl },
|
||||
{ &vop_lease_desc, (vop_t *) nullop },
|
||||
{ &vop_lease_desc, (vop_t *) vop_null },
|
||||
{ &vop_link_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_lookup_desc, (vop_t *) fifo_lookup },
|
||||
{ &vop_mkdir_desc, (vop_t *) fifo_badop },
|
||||
@ -100,11 +99,11 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
|
||||
{ &vop_readdir_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_readlink_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_reallocblks_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_reclaim_desc, (vop_t *) nullop },
|
||||
{ &vop_reclaim_desc, (vop_t *) vop_null },
|
||||
{ &vop_remove_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_rename_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_rmdir_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_setattr_desc, (vop_t *) fifo_ebadf },
|
||||
{ &vop_setattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_symlink_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_write_desc, (vop_t *) fifo_write },
|
||||
{ NULL, NULL }
|
||||
@ -484,16 +483,6 @@ fifo_print(ap)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fifo failed operation
|
||||
*/
|
||||
static int
|
||||
fifo_ebadf()
|
||||
{
|
||||
|
||||
return (EBADF);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fifo advisory byte-level locks.
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_vnops.c,v 1.49 1997/10/16 20:32:31 phk Exp $ */
|
||||
/* $Id: msdosfs_vnops.c,v 1.50 1997/10/17 12:36:17 phk Exp $ */
|
||||
/* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -1833,7 +1833,7 @@ msdosfs_pathconf(ap)
|
||||
/* Global vfs data structures for msdosfs */
|
||||
vop_t **msdosfs_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) msdosfs_abortop },
|
||||
{ &vop_access_desc, (vop_t *) msdosfs_access },
|
||||
{ &vop_bmap_desc, (vop_t *) msdosfs_bmap },
|
||||
|
@ -35,7 +35,7 @@
|
||||
*
|
||||
* @(#)portal_vnops.c 8.14 (Berkeley) 5/21/95
|
||||
*
|
||||
* $Id: portal_vnops.c,v 1.25 1997/10/16 20:32:27 phk Exp $
|
||||
* $Id: portal_vnops.c,v 1.26 1997/10/16 22:00:27 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -598,8 +598,8 @@ portal_badop()
|
||||
|
||||
vop_t **portal_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc portal_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_access_desc, (vop_t *) nullop },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_access_desc, (vop_t *) vop_null },
|
||||
{ &vop_bmap_desc, (vop_t *) portal_badop },
|
||||
{ &vop_getattr_desc, (vop_t *) portal_getattr },
|
||||
{ &vop_inactive_desc, (vop_t *) portal_inactive },
|
||||
|
@ -36,7 +36,7 @@
|
||||
*
|
||||
* @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95
|
||||
*
|
||||
* $Id: procfs_vnops.c,v 1.37 1997/10/16 20:32:28 phk Exp $
|
||||
* $Id: procfs_vnops.c,v 1.38 1997/10/16 22:00:36 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -884,7 +884,7 @@ atopid(b, len)
|
||||
*/
|
||||
vop_t **procfs_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc procfs_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) procfs_abortop },
|
||||
{ &vop_access_desc, (vop_t *) procfs_access },
|
||||
{ &vop_advlock_desc, (vop_t *) procfs_badop },
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95
|
||||
* $Id: spec_vnops.c,v 1.48 1997/10/16 20:32:29 phk Exp $
|
||||
* $Id: spec_vnops.c,v 1.49 1997/10/16 22:00:42 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -58,7 +58,6 @@
|
||||
|
||||
#include <miscfs/specfs/specdev.h>
|
||||
|
||||
static int spec_ebadf __P((void));
|
||||
static int spec_getattr __P((struct vop_getattr_args *));
|
||||
static int spec_badop __P((void));
|
||||
static int spec_strategy __P((struct vop_strategy_args *));
|
||||
@ -79,8 +78,8 @@ static int spec_getpages __P((struct vop_getpages_args *));
|
||||
struct vnode *speclisth[SPECHSZ];
|
||||
vop_t **spec_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_access_desc, (vop_t *) spec_ebadf },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_access_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_advlock_desc, (vop_t *) spec_advlock },
|
||||
{ &vop_bmap_desc, (vop_t *) spec_bmap },
|
||||
{ &vop_close_desc, (vop_t *) spec_close },
|
||||
@ -90,7 +89,7 @@ static struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
|
||||
{ &vop_getpages_desc, (vop_t *) spec_getpages },
|
||||
{ &vop_inactive_desc, (vop_t *) spec_inactive },
|
||||
{ &vop_ioctl_desc, (vop_t *) spec_ioctl },
|
||||
{ &vop_lease_desc, (vop_t *) nullop },
|
||||
{ &vop_lease_desc, (vop_t *) vop_null },
|
||||
{ &vop_link_desc, (vop_t *) spec_badop },
|
||||
{ &vop_lookup_desc, (vop_t *) spec_lookup },
|
||||
{ &vop_mkdir_desc, (vop_t *) spec_badop },
|
||||
@ -103,11 +102,11 @@ static struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
|
||||
{ &vop_readdir_desc, (vop_t *) spec_badop },
|
||||
{ &vop_readlink_desc, (vop_t *) spec_badop },
|
||||
{ &vop_reallocblks_desc, (vop_t *) spec_badop },
|
||||
{ &vop_reclaim_desc, (vop_t *) nullop },
|
||||
{ &vop_reclaim_desc, (vop_t *) vop_null },
|
||||
{ &vop_remove_desc, (vop_t *) spec_badop },
|
||||
{ &vop_rename_desc, (vop_t *) spec_badop },
|
||||
{ &vop_rmdir_desc, (vop_t *) spec_badop },
|
||||
{ &vop_setattr_desc, (vop_t *) spec_ebadf },
|
||||
{ &vop_setattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_strategy_desc, (vop_t *) spec_strategy },
|
||||
{ &vop_symlink_desc, (vop_t *) spec_badop },
|
||||
{ &vop_write_desc, (vop_t *) spec_write },
|
||||
@ -696,16 +695,6 @@ spec_advlock(ap)
|
||||
return (ap->a_flags & F_FLOCK ? EOPNOTSUPP : EINVAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Special device failed operation
|
||||
*/
|
||||
static int
|
||||
spec_ebadf()
|
||||
{
|
||||
|
||||
return (EBADF);
|
||||
}
|
||||
|
||||
/*
|
||||
* Special device bad operation
|
||||
*/
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)union_vnops.c 8.32 (Berkeley) 6/23/95
|
||||
* $Id: union_vnops.c,v 1.44 1997/10/15 10:04:54 phk Exp $
|
||||
* $Id: union_vnops.c,v 1.45 1997/10/16 20:32:30 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -1739,7 +1739,7 @@ union_strategy(ap)
|
||||
*/
|
||||
vop_t **union_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc union_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) union_abortop },
|
||||
{ &vop_access_desc, (vop_t *) union_access },
|
||||
{ &vop_advlock_desc, (vop_t *) union_advlock },
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)cd9660_vnops.c 8.19 (Berkeley) 5/27/95
|
||||
* $Id: cd9660_vnops.c,v 1.45 1997/10/16 20:32:21 phk Exp $
|
||||
* $Id: cd9660_vnops.c,v 1.46 1997/10/17 12:36:11 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -812,7 +812,7 @@ cd9660_pathconf(ap)
|
||||
*/
|
||||
vop_t **cd9660_vnodeop_p;
|
||||
struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) cd9660_abortop },
|
||||
{ &vop_access_desc, (vop_t *) cd9660_access },
|
||||
{ &vop_bmap_desc, (vop_t *) cd9660_bmap },
|
||||
|
@ -18,7 +18,7 @@
|
||||
* 5. Modifications may be freely made to this file if the above conditions
|
||||
* are met.
|
||||
*
|
||||
* $Id: vfs_bio.c,v 1.129 1997/10/11 18:31:26 phk Exp $
|
||||
* $Id: vfs_bio.c,v 1.130 1997/10/12 20:24:21 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -397,13 +397,6 @@ bwrite(struct buf * bp)
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
vn_bwrite(ap)
|
||||
struct vop_bwrite_args *ap;
|
||||
{
|
||||
return (bwrite(ap->a_bp));
|
||||
}
|
||||
|
||||
void
|
||||
vfs_bio_need_satisfy(void) {
|
||||
++numfreebuffers;
|
||||
|
@ -40,9 +40,11 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/unistd.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/poll.h>
|
||||
|
||||
static int vop_nostrategy __P((struct vop_strategy_args *));
|
||||
|
||||
@ -57,9 +59,9 @@ static int vop_nostrategy __P((struct vop_strategy_args *));
|
||||
vop_t **default_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc default_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vop_eopnotsupp },
|
||||
{ &vop_abortop_desc, (vop_t *) nullop },
|
||||
{ &vop_abortop_desc, (vop_t *) vop_null },
|
||||
{ &vop_advlock_desc, (vop_t *) vop_einval },
|
||||
{ &vop_bwrite_desc, (vop_t *) vn_bwrite },
|
||||
{ &vop_bwrite_desc, (vop_t *) vop_stdbwrite },
|
||||
{ &vop_close_desc, (vop_t *) vop_null },
|
||||
{ &vop_fsync_desc, (vop_t *) vop_null },
|
||||
{ &vop_ioctl_desc, (vop_t *) vop_enotty },
|
||||
@ -217,3 +219,204 @@ vop_stdislocked(ap)
|
||||
return (lockstatus(l));
|
||||
}
|
||||
|
||||
/*
|
||||
* Return true for select/poll.
|
||||
*/
|
||||
int
|
||||
vop_nopoll(ap)
|
||||
struct vop_poll_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_events;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
|
||||
/*
|
||||
* Just return what we were asked for.
|
||||
*/
|
||||
return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
|
||||
}
|
||||
|
||||
int
|
||||
vop_stdbwrite(ap)
|
||||
struct vop_bwrite_args *ap;
|
||||
{
|
||||
return (bwrite(ap->a_bp));
|
||||
}
|
||||
|
||||
/*
|
||||
* Stubs to use when there is no locking to be done on the underlying object.
|
||||
* A minimal shared lock is necessary to ensure that the underlying object
|
||||
* is not revoked while an operation is in progress. So, an active shared
|
||||
* count is maintained in an auxillary vnode lock structure.
|
||||
*/
|
||||
int
|
||||
vop_sharedlock(ap)
|
||||
struct vop_lock_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_flags;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
/*
|
||||
* This code cannot be used until all the non-locking filesystems
|
||||
* (notably NFS) are converted to properly lock and release nodes.
|
||||
* Also, certain vnode operations change the locking state within
|
||||
* the operation (create, mknod, remove, link, rename, mkdir, rmdir,
|
||||
* and symlink). Ideally these operations should not change the
|
||||
* lock state, but should be changed to let the caller of the
|
||||
* function unlock them. Otherwise all intermediate vnode layers
|
||||
* (such as union, umapfs, etc) must catch these functions to do
|
||||
* the necessary locking at their layer. Note that the inactive
|
||||
* and lookup operations also change their lock state, but this
|
||||
* cannot be avoided, so these two operations will always need
|
||||
* to be handled in intermediate layers.
|
||||
*/
|
||||
struct vnode *vp = ap->a_vp;
|
||||
int vnflags, flags = ap->a_flags;
|
||||
|
||||
if (vp->v_vnlock == NULL) {
|
||||
if ((flags & LK_TYPE_MASK) == LK_DRAIN)
|
||||
return (0);
|
||||
MALLOC(vp->v_vnlock, struct lock *, sizeof(struct lock),
|
||||
M_VNODE, M_WAITOK);
|
||||
lockinit(vp->v_vnlock, PVFS, "vnlock", 0, 0);
|
||||
}
|
||||
switch (flags & LK_TYPE_MASK) {
|
||||
case LK_DRAIN:
|
||||
vnflags = LK_DRAIN;
|
||||
break;
|
||||
case LK_EXCLUSIVE:
|
||||
#ifdef DEBUG_VFS_LOCKS
|
||||
/*
|
||||
* Normally, we use shared locks here, but that confuses
|
||||
* the locking assertions.
|
||||
*/
|
||||
vnflags = LK_EXCLUSIVE;
|
||||
break;
|
||||
#endif
|
||||
case LK_SHARED:
|
||||
vnflags = LK_SHARED;
|
||||
break;
|
||||
case LK_UPGRADE:
|
||||
case LK_EXCLUPGRADE:
|
||||
case LK_DOWNGRADE:
|
||||
return (0);
|
||||
case LK_RELEASE:
|
||||
default:
|
||||
panic("vop_sharedlock: bad operation %d", flags & LK_TYPE_MASK);
|
||||
}
|
||||
if (flags & LK_INTERLOCK)
|
||||
vnflags |= LK_INTERLOCK;
|
||||
return(lockmgr(vp->v_vnlock, vnflags, &vp->v_interlock, ap->a_p));
|
||||
}
|
||||
|
||||
/*
|
||||
* Stubs to use when there is no locking to be done on the underlying object.
|
||||
* A minimal shared lock is necessary to ensure that the underlying object
|
||||
* is not revoked while an operation is in progress. So, an active shared
|
||||
* count is maintained in an auxillary vnode lock structure.
|
||||
*/
|
||||
int
|
||||
vop_nolock(ap)
|
||||
struct vop_lock_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_flags;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
#ifdef notyet
|
||||
/*
|
||||
* This code cannot be used until all the non-locking filesystems
|
||||
* (notably NFS) are converted to properly lock and release nodes.
|
||||
* Also, certain vnode operations change the locking state within
|
||||
* the operation (create, mknod, remove, link, rename, mkdir, rmdir,
|
||||
* and symlink). Ideally these operations should not change the
|
||||
* lock state, but should be changed to let the caller of the
|
||||
* function unlock them. Otherwise all intermediate vnode layers
|
||||
* (such as union, umapfs, etc) must catch these functions to do
|
||||
* the necessary locking at their layer. Note that the inactive
|
||||
* and lookup operations also change their lock state, but this
|
||||
* cannot be avoided, so these two operations will always need
|
||||
* to be handled in intermediate layers.
|
||||
*/
|
||||
struct vnode *vp = ap->a_vp;
|
||||
int vnflags, flags = ap->a_flags;
|
||||
|
||||
if (vp->v_vnlock == NULL) {
|
||||
if ((flags & LK_TYPE_MASK) == LK_DRAIN)
|
||||
return (0);
|
||||
MALLOC(vp->v_vnlock, struct lock *, sizeof(struct lock),
|
||||
M_VNODE, M_WAITOK);
|
||||
lockinit(vp->v_vnlock, PVFS, "vnlock", 0, 0);
|
||||
}
|
||||
switch (flags & LK_TYPE_MASK) {
|
||||
case LK_DRAIN:
|
||||
vnflags = LK_DRAIN;
|
||||
break;
|
||||
case LK_EXCLUSIVE:
|
||||
case LK_SHARED:
|
||||
vnflags = LK_SHARED;
|
||||
break;
|
||||
case LK_UPGRADE:
|
||||
case LK_EXCLUPGRADE:
|
||||
case LK_DOWNGRADE:
|
||||
return (0);
|
||||
case LK_RELEASE:
|
||||
default:
|
||||
panic("vop_nolock: bad operation %d", flags & LK_TYPE_MASK);
|
||||
}
|
||||
if (flags & LK_INTERLOCK)
|
||||
vnflags |= LK_INTERLOCK;
|
||||
return(lockmgr(vp->v_vnlock, vnflags, &vp->v_interlock, ap->a_p));
|
||||
#else /* for now */
|
||||
/*
|
||||
* Since we are not using the lock manager, we must clear
|
||||
* the interlock here.
|
||||
*/
|
||||
if (ap->a_flags & LK_INTERLOCK) {
|
||||
simple_unlock(&ap->a_vp->v_interlock);
|
||||
}
|
||||
return (0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Do the inverse of vop_nolock, handling the interlock in a compatible way.
|
||||
*/
|
||||
int
|
||||
vop_nounlock(ap)
|
||||
struct vop_unlock_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_flags;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
struct vnode *vp = ap->a_vp;
|
||||
|
||||
if (vp->v_vnlock == NULL) {
|
||||
if (ap->a_flags & LK_INTERLOCK)
|
||||
simple_unlock(&ap->a_vp->v_interlock);
|
||||
return (0);
|
||||
}
|
||||
return (lockmgr(vp->v_vnlock, LK_RELEASE | ap->a_flags,
|
||||
&ap->a_vp->v_interlock, ap->a_p));
|
||||
}
|
||||
|
||||
/*
|
||||
* Return whether or not the node is in use.
|
||||
*/
|
||||
int
|
||||
vop_noislocked(ap)
|
||||
struct vop_islocked_args /* {
|
||||
struct vnode *a_vp;
|
||||
} */ *ap;
|
||||
{
|
||||
struct vnode *vp = ap->a_vp;
|
||||
|
||||
if (vp->v_vnlock == NULL)
|
||||
return (0);
|
||||
return (lockstatus(vp->v_vnlock));
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.109 1997/10/11 18:31:26 phk Exp $
|
||||
* $Id: vfs_subr.c,v 1.110 1997/10/12 20:24:26 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -867,182 +867,6 @@ vget(vp, flags, p)
|
||||
simple_unlock(&vp->v_interlock);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Stubs to use when there is no locking to be done on the underlying object.
|
||||
* A minimal shared lock is necessary to ensure that the underlying object
|
||||
* is not revoked while an operation is in progress. So, an active shared
|
||||
* count is maintained in an auxillary vnode lock structure.
|
||||
*/
|
||||
int
|
||||
vop_sharedlock(ap)
|
||||
struct vop_lock_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_flags;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
/*
|
||||
* This code cannot be used until all the non-locking filesystems
|
||||
* (notably NFS) are converted to properly lock and release nodes.
|
||||
* Also, certain vnode operations change the locking state within
|
||||
* the operation (create, mknod, remove, link, rename, mkdir, rmdir,
|
||||
* and symlink). Ideally these operations should not change the
|
||||
* lock state, but should be changed to let the caller of the
|
||||
* function unlock them. Otherwise all intermediate vnode layers
|
||||
* (such as union, umapfs, etc) must catch these functions to do
|
||||
* the necessary locking at their layer. Note that the inactive
|
||||
* and lookup operations also change their lock state, but this
|
||||
* cannot be avoided, so these two operations will always need
|
||||
* to be handled in intermediate layers.
|
||||
*/
|
||||
struct vnode *vp = ap->a_vp;
|
||||
int vnflags, flags = ap->a_flags;
|
||||
|
||||
if (vp->v_vnlock == NULL) {
|
||||
if ((flags & LK_TYPE_MASK) == LK_DRAIN)
|
||||
return (0);
|
||||
MALLOC(vp->v_vnlock, struct lock *, sizeof(struct lock),
|
||||
M_VNODE, M_WAITOK);
|
||||
lockinit(vp->v_vnlock, PVFS, "vnlock", 0, 0);
|
||||
}
|
||||
switch (flags & LK_TYPE_MASK) {
|
||||
case LK_DRAIN:
|
||||
vnflags = LK_DRAIN;
|
||||
break;
|
||||
case LK_EXCLUSIVE:
|
||||
#ifdef DEBUG_VFS_LOCKS
|
||||
/*
|
||||
* Normally, we use shared locks here, but that confuses
|
||||
* the locking assertions.
|
||||
*/
|
||||
vnflags = LK_EXCLUSIVE;
|
||||
break;
|
||||
#endif
|
||||
case LK_SHARED:
|
||||
vnflags = LK_SHARED;
|
||||
break;
|
||||
case LK_UPGRADE:
|
||||
case LK_EXCLUPGRADE:
|
||||
case LK_DOWNGRADE:
|
||||
return (0);
|
||||
case LK_RELEASE:
|
||||
default:
|
||||
panic("vop_sharedlock: bad operation %d", flags & LK_TYPE_MASK);
|
||||
}
|
||||
if (flags & LK_INTERLOCK)
|
||||
vnflags |= LK_INTERLOCK;
|
||||
return(lockmgr(vp->v_vnlock, vnflags, &vp->v_interlock, ap->a_p));
|
||||
}
|
||||
|
||||
/*
|
||||
* Stubs to use when there is no locking to be done on the underlying object.
|
||||
* A minimal shared lock is necessary to ensure that the underlying object
|
||||
* is not revoked while an operation is in progress. So, an active shared
|
||||
* count is maintained in an auxillary vnode lock structure.
|
||||
*/
|
||||
int
|
||||
vop_nolock(ap)
|
||||
struct vop_lock_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_flags;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
#ifdef notyet
|
||||
/*
|
||||
* This code cannot be used until all the non-locking filesystems
|
||||
* (notably NFS) are converted to properly lock and release nodes.
|
||||
* Also, certain vnode operations change the locking state within
|
||||
* the operation (create, mknod, remove, link, rename, mkdir, rmdir,
|
||||
* and symlink). Ideally these operations should not change the
|
||||
* lock state, but should be changed to let the caller of the
|
||||
* function unlock them. Otherwise all intermediate vnode layers
|
||||
* (such as union, umapfs, etc) must catch these functions to do
|
||||
* the necessary locking at their layer. Note that the inactive
|
||||
* and lookup operations also change their lock state, but this
|
||||
* cannot be avoided, so these two operations will always need
|
||||
* to be handled in intermediate layers.
|
||||
*/
|
||||
struct vnode *vp = ap->a_vp;
|
||||
int vnflags, flags = ap->a_flags;
|
||||
|
||||
if (vp->v_vnlock == NULL) {
|
||||
if ((flags & LK_TYPE_MASK) == LK_DRAIN)
|
||||
return (0);
|
||||
MALLOC(vp->v_vnlock, struct lock *, sizeof(struct lock),
|
||||
M_VNODE, M_WAITOK);
|
||||
lockinit(vp->v_vnlock, PVFS, "vnlock", 0, 0);
|
||||
}
|
||||
switch (flags & LK_TYPE_MASK) {
|
||||
case LK_DRAIN:
|
||||
vnflags = LK_DRAIN;
|
||||
break;
|
||||
case LK_EXCLUSIVE:
|
||||
case LK_SHARED:
|
||||
vnflags = LK_SHARED;
|
||||
break;
|
||||
case LK_UPGRADE:
|
||||
case LK_EXCLUPGRADE:
|
||||
case LK_DOWNGRADE:
|
||||
return (0);
|
||||
case LK_RELEASE:
|
||||
default:
|
||||
panic("vop_nolock: bad operation %d", flags & LK_TYPE_MASK);
|
||||
}
|
||||
if (flags & LK_INTERLOCK)
|
||||
vnflags |= LK_INTERLOCK;
|
||||
return(lockmgr(vp->v_vnlock, vnflags, &vp->v_interlock, ap->a_p));
|
||||
#else /* for now */
|
||||
/*
|
||||
* Since we are not using the lock manager, we must clear
|
||||
* the interlock here.
|
||||
*/
|
||||
if (ap->a_flags & LK_INTERLOCK) {
|
||||
simple_unlock(&ap->a_vp->v_interlock);
|
||||
}
|
||||
return (0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Do the inverse of vop_nolock, handling the interlock in a compatible way.
|
||||
*/
|
||||
int
|
||||
vop_nounlock(ap)
|
||||
struct vop_unlock_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_flags;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
struct vnode *vp = ap->a_vp;
|
||||
|
||||
if (vp->v_vnlock == NULL) {
|
||||
if (ap->a_flags & LK_INTERLOCK)
|
||||
simple_unlock(&ap->a_vp->v_interlock);
|
||||
return (0);
|
||||
}
|
||||
return (lockmgr(vp->v_vnlock, LK_RELEASE | ap->a_flags,
|
||||
&ap->a_vp->v_interlock, ap->a_p));
|
||||
}
|
||||
|
||||
/*
|
||||
* Return whether or not the node is in use.
|
||||
*/
|
||||
int
|
||||
vop_noislocked(ap)
|
||||
struct vop_islocked_args /* {
|
||||
struct vnode *a_vp;
|
||||
} */ *ap;
|
||||
{
|
||||
struct vnode *vp = ap->a_vp;
|
||||
|
||||
if (vp->v_vnlock == NULL)
|
||||
return (0);
|
||||
return (lockstatus(vp->v_vnlock));
|
||||
}
|
||||
|
||||
/* #ifdef DIAGNOSTIC */
|
||||
/*
|
||||
* Vnode reference, just increment the count
|
||||
@ -1640,26 +1464,6 @@ vcount(vp)
|
||||
simple_unlock(&spechash_slock);
|
||||
return (count);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return true for select/poll.
|
||||
*/
|
||||
int
|
||||
vop_nopoll(ap)
|
||||
struct vop_poll_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_events;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
|
||||
/*
|
||||
* Just return what we were asked for.
|
||||
*/
|
||||
return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
|
||||
}
|
||||
|
||||
/*
|
||||
* Print out a description of a vnode.
|
||||
*/
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
|
||||
* $Id: vfs_subr.c,v 1.109 1997/10/11 18:31:26 phk Exp $
|
||||
* $Id: vfs_subr.c,v 1.110 1997/10/12 20:24:26 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -867,182 +867,6 @@ vget(vp, flags, p)
|
||||
simple_unlock(&vp->v_interlock);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Stubs to use when there is no locking to be done on the underlying object.
|
||||
* A minimal shared lock is necessary to ensure that the underlying object
|
||||
* is not revoked while an operation is in progress. So, an active shared
|
||||
* count is maintained in an auxillary vnode lock structure.
|
||||
*/
|
||||
int
|
||||
vop_sharedlock(ap)
|
||||
struct vop_lock_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_flags;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
/*
|
||||
* This code cannot be used until all the non-locking filesystems
|
||||
* (notably NFS) are converted to properly lock and release nodes.
|
||||
* Also, certain vnode operations change the locking state within
|
||||
* the operation (create, mknod, remove, link, rename, mkdir, rmdir,
|
||||
* and symlink). Ideally these operations should not change the
|
||||
* lock state, but should be changed to let the caller of the
|
||||
* function unlock them. Otherwise all intermediate vnode layers
|
||||
* (such as union, umapfs, etc) must catch these functions to do
|
||||
* the necessary locking at their layer. Note that the inactive
|
||||
* and lookup operations also change their lock state, but this
|
||||
* cannot be avoided, so these two operations will always need
|
||||
* to be handled in intermediate layers.
|
||||
*/
|
||||
struct vnode *vp = ap->a_vp;
|
||||
int vnflags, flags = ap->a_flags;
|
||||
|
||||
if (vp->v_vnlock == NULL) {
|
||||
if ((flags & LK_TYPE_MASK) == LK_DRAIN)
|
||||
return (0);
|
||||
MALLOC(vp->v_vnlock, struct lock *, sizeof(struct lock),
|
||||
M_VNODE, M_WAITOK);
|
||||
lockinit(vp->v_vnlock, PVFS, "vnlock", 0, 0);
|
||||
}
|
||||
switch (flags & LK_TYPE_MASK) {
|
||||
case LK_DRAIN:
|
||||
vnflags = LK_DRAIN;
|
||||
break;
|
||||
case LK_EXCLUSIVE:
|
||||
#ifdef DEBUG_VFS_LOCKS
|
||||
/*
|
||||
* Normally, we use shared locks here, but that confuses
|
||||
* the locking assertions.
|
||||
*/
|
||||
vnflags = LK_EXCLUSIVE;
|
||||
break;
|
||||
#endif
|
||||
case LK_SHARED:
|
||||
vnflags = LK_SHARED;
|
||||
break;
|
||||
case LK_UPGRADE:
|
||||
case LK_EXCLUPGRADE:
|
||||
case LK_DOWNGRADE:
|
||||
return (0);
|
||||
case LK_RELEASE:
|
||||
default:
|
||||
panic("vop_sharedlock: bad operation %d", flags & LK_TYPE_MASK);
|
||||
}
|
||||
if (flags & LK_INTERLOCK)
|
||||
vnflags |= LK_INTERLOCK;
|
||||
return(lockmgr(vp->v_vnlock, vnflags, &vp->v_interlock, ap->a_p));
|
||||
}
|
||||
|
||||
/*
|
||||
* Stubs to use when there is no locking to be done on the underlying object.
|
||||
* A minimal shared lock is necessary to ensure that the underlying object
|
||||
* is not revoked while an operation is in progress. So, an active shared
|
||||
* count is maintained in an auxillary vnode lock structure.
|
||||
*/
|
||||
int
|
||||
vop_nolock(ap)
|
||||
struct vop_lock_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_flags;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
#ifdef notyet
|
||||
/*
|
||||
* This code cannot be used until all the non-locking filesystems
|
||||
* (notably NFS) are converted to properly lock and release nodes.
|
||||
* Also, certain vnode operations change the locking state within
|
||||
* the operation (create, mknod, remove, link, rename, mkdir, rmdir,
|
||||
* and symlink). Ideally these operations should not change the
|
||||
* lock state, but should be changed to let the caller of the
|
||||
* function unlock them. Otherwise all intermediate vnode layers
|
||||
* (such as union, umapfs, etc) must catch these functions to do
|
||||
* the necessary locking at their layer. Note that the inactive
|
||||
* and lookup operations also change their lock state, but this
|
||||
* cannot be avoided, so these two operations will always need
|
||||
* to be handled in intermediate layers.
|
||||
*/
|
||||
struct vnode *vp = ap->a_vp;
|
||||
int vnflags, flags = ap->a_flags;
|
||||
|
||||
if (vp->v_vnlock == NULL) {
|
||||
if ((flags & LK_TYPE_MASK) == LK_DRAIN)
|
||||
return (0);
|
||||
MALLOC(vp->v_vnlock, struct lock *, sizeof(struct lock),
|
||||
M_VNODE, M_WAITOK);
|
||||
lockinit(vp->v_vnlock, PVFS, "vnlock", 0, 0);
|
||||
}
|
||||
switch (flags & LK_TYPE_MASK) {
|
||||
case LK_DRAIN:
|
||||
vnflags = LK_DRAIN;
|
||||
break;
|
||||
case LK_EXCLUSIVE:
|
||||
case LK_SHARED:
|
||||
vnflags = LK_SHARED;
|
||||
break;
|
||||
case LK_UPGRADE:
|
||||
case LK_EXCLUPGRADE:
|
||||
case LK_DOWNGRADE:
|
||||
return (0);
|
||||
case LK_RELEASE:
|
||||
default:
|
||||
panic("vop_nolock: bad operation %d", flags & LK_TYPE_MASK);
|
||||
}
|
||||
if (flags & LK_INTERLOCK)
|
||||
vnflags |= LK_INTERLOCK;
|
||||
return(lockmgr(vp->v_vnlock, vnflags, &vp->v_interlock, ap->a_p));
|
||||
#else /* for now */
|
||||
/*
|
||||
* Since we are not using the lock manager, we must clear
|
||||
* the interlock here.
|
||||
*/
|
||||
if (ap->a_flags & LK_INTERLOCK) {
|
||||
simple_unlock(&ap->a_vp->v_interlock);
|
||||
}
|
||||
return (0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Do the inverse of vop_nolock, handling the interlock in a compatible way.
|
||||
*/
|
||||
int
|
||||
vop_nounlock(ap)
|
||||
struct vop_unlock_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_flags;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
struct vnode *vp = ap->a_vp;
|
||||
|
||||
if (vp->v_vnlock == NULL) {
|
||||
if (ap->a_flags & LK_INTERLOCK)
|
||||
simple_unlock(&ap->a_vp->v_interlock);
|
||||
return (0);
|
||||
}
|
||||
return (lockmgr(vp->v_vnlock, LK_RELEASE | ap->a_flags,
|
||||
&ap->a_vp->v_interlock, ap->a_p));
|
||||
}
|
||||
|
||||
/*
|
||||
* Return whether or not the node is in use.
|
||||
*/
|
||||
int
|
||||
vop_noislocked(ap)
|
||||
struct vop_islocked_args /* {
|
||||
struct vnode *a_vp;
|
||||
} */ *ap;
|
||||
{
|
||||
struct vnode *vp = ap->a_vp;
|
||||
|
||||
if (vp->v_vnlock == NULL)
|
||||
return (0);
|
||||
return (lockstatus(vp->v_vnlock));
|
||||
}
|
||||
|
||||
/* #ifdef DIAGNOSTIC */
|
||||
/*
|
||||
* Vnode reference, just increment the count
|
||||
@ -1640,26 +1464,6 @@ vcount(vp)
|
||||
simple_unlock(&spechash_slock);
|
||||
return (count);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return true for select/poll.
|
||||
*/
|
||||
int
|
||||
vop_nopoll(ap)
|
||||
struct vop_poll_args /* {
|
||||
struct vnode *a_vp;
|
||||
int a_events;
|
||||
struct ucred *a_cred;
|
||||
struct proc *a_p;
|
||||
} */ *ap;
|
||||
{
|
||||
|
||||
/*
|
||||
* Just return what we were asked for.
|
||||
*/
|
||||
return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
|
||||
}
|
||||
|
||||
/*
|
||||
* Print out a description of a vnode.
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: dead_vnops.c,v 1.19 1997/10/16 20:32:24 phk Exp $
|
||||
* $Id: dead_vnops.c,v 1.20 1997/10/16 21:59:55 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -45,7 +45,6 @@ static int chkvnlock __P((struct vnode *));
|
||||
* Prototypes for dead operations on vnodes.
|
||||
*/
|
||||
static int dead_badop __P((void));
|
||||
static int dead_ebadf __P((void));
|
||||
static int dead_lookup __P((struct vop_lookup_args *));
|
||||
static int dead_open __P((struct vop_open_args *));
|
||||
static int dead_read __P((struct vop_read_args *));
|
||||
@ -57,13 +56,13 @@ static int dead_print __P((struct vop_print_args *));
|
||||
|
||||
vop_t **dead_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc dead_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_access_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_advlock_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_access_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_advlock_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_bmap_desc, (vop_t *) dead_bmap },
|
||||
{ &vop_create_desc, (vop_t *) dead_badop },
|
||||
{ &vop_getattr_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_inactive_desc, (vop_t *) nullop },
|
||||
{ &vop_getattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_inactive_desc, (vop_t *) vop_null },
|
||||
{ &vop_ioctl_desc, (vop_t *) dead_ioctl },
|
||||
{ &vop_link_desc, (vop_t *) dead_badop },
|
||||
{ &vop_lock_desc, (vop_t *) dead_lock },
|
||||
@ -72,16 +71,16 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = {
|
||||
{ &vop_mknod_desc, (vop_t *) dead_badop },
|
||||
{ &vop_mmap_desc, (vop_t *) dead_badop },
|
||||
{ &vop_open_desc, (vop_t *) dead_open },
|
||||
{ &vop_pathconf_desc, (vop_t *) dead_ebadf }, /* per pathconf(2) */
|
||||
{ &vop_pathconf_desc, (vop_t *) vop_ebadf }, /* per pathconf(2) */
|
||||
{ &vop_print_desc, (vop_t *) dead_print },
|
||||
{ &vop_read_desc, (vop_t *) dead_read },
|
||||
{ &vop_readdir_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_readlink_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_reclaim_desc, (vop_t *) nullop },
|
||||
{ &vop_readdir_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_readlink_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_reclaim_desc, (vop_t *) vop_null },
|
||||
{ &vop_remove_desc, (vop_t *) dead_badop },
|
||||
{ &vop_rename_desc, (vop_t *) dead_badop },
|
||||
{ &vop_rmdir_desc, (vop_t *) dead_badop },
|
||||
{ &vop_setattr_desc, (vop_t *) dead_ebadf },
|
||||
{ &vop_setattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_symlink_desc, (vop_t *) dead_badop },
|
||||
{ &vop_write_desc, (vop_t *) dead_write },
|
||||
{ NULL, NULL }
|
||||
@ -260,16 +259,6 @@ dead_print(ap)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Empty vnode failed operation
|
||||
*/
|
||||
static int
|
||||
dead_ebadf()
|
||||
{
|
||||
|
||||
return (EBADF);
|
||||
}
|
||||
|
||||
/*
|
||||
* Empty vnode bad operation
|
||||
*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Written by Julian Elischer (julian@DIALix.oz.au)
|
||||
*
|
||||
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.45 1997/10/16 20:32:24 phk Exp $
|
||||
* $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.46 1997/10/16 21:59:59 phk Exp $
|
||||
*
|
||||
* symlinks can wait 'til later.
|
||||
*/
|
||||
@ -1522,7 +1522,7 @@ devfs_dropvnode(dn_p dnp)
|
||||
|
||||
vop_t **devfs_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc devfs_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_access_desc, (vop_t *) devfs_access },
|
||||
{ &vop_bmap_desc, (vop_t *) devfs_badop },
|
||||
{ &vop_getattr_desc, (vop_t *) devfs_getattr },
|
||||
|
@ -35,7 +35,7 @@
|
||||
*
|
||||
* @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94
|
||||
*
|
||||
* $Id: fdesc_vnops.c,v 1.30 1997/10/16 20:32:25 phk Exp $
|
||||
* $Id: fdesc_vnops.c,v 1.31 1997/10/16 22:00:05 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -856,8 +856,8 @@ fdesc_badop()
|
||||
}
|
||||
|
||||
static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_access_desc, (vop_t *) nullop },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_access_desc, (vop_t *) vop_null },
|
||||
{ &vop_bmap_desc, (vop_t *) fdesc_badop },
|
||||
{ &vop_getattr_desc, (vop_t *) fdesc_getattr },
|
||||
{ &vop_inactive_desc, (vop_t *) fdesc_inactive },
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)fifo_vnops.c 8.10 (Berkeley) 5/27/95
|
||||
* $Id: fifo_vnops.c,v 1.33 1997/10/16 20:32:26 phk Exp $
|
||||
* $Id: fifo_vnops.c,v 1.34 1997/10/16 22:00:12 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -60,7 +60,6 @@ struct fifoinfo {
|
||||
long fi_writers;
|
||||
};
|
||||
|
||||
static int fifo_ebadf __P((void));
|
||||
static int fifo_badop __P((void));
|
||||
static int fifo_print __P((struct vop_print_args *));
|
||||
static int fifo_lookup __P((struct vop_lookup_args *));
|
||||
@ -77,17 +76,17 @@ static int fifo_advlock __P((struct vop_advlock_args *));
|
||||
|
||||
vop_t **fifo_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_access_desc, (vop_t *) fifo_ebadf },
|
||||
{ &vop_access_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_advlock_desc, (vop_t *) fifo_advlock },
|
||||
{ &vop_bmap_desc, (vop_t *) fifo_bmap },
|
||||
{ &vop_close_desc, (vop_t *) fifo_close },
|
||||
{ &vop_create_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_getattr_desc, (vop_t *) fifo_ebadf },
|
||||
{ &vop_getattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_inactive_desc, (vop_t *) fifo_inactive },
|
||||
{ &vop_ioctl_desc, (vop_t *) fifo_ioctl },
|
||||
{ &vop_lease_desc, (vop_t *) nullop },
|
||||
{ &vop_lease_desc, (vop_t *) vop_null },
|
||||
{ &vop_link_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_lookup_desc, (vop_t *) fifo_lookup },
|
||||
{ &vop_mkdir_desc, (vop_t *) fifo_badop },
|
||||
@ -100,11 +99,11 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
|
||||
{ &vop_readdir_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_readlink_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_reallocblks_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_reclaim_desc, (vop_t *) nullop },
|
||||
{ &vop_reclaim_desc, (vop_t *) vop_null },
|
||||
{ &vop_remove_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_rename_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_rmdir_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_setattr_desc, (vop_t *) fifo_ebadf },
|
||||
{ &vop_setattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_symlink_desc, (vop_t *) fifo_badop },
|
||||
{ &vop_write_desc, (vop_t *) fifo_write },
|
||||
{ NULL, NULL }
|
||||
@ -484,16 +483,6 @@ fifo_print(ap)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fifo failed operation
|
||||
*/
|
||||
static int
|
||||
fifo_ebadf()
|
||||
{
|
||||
|
||||
return (EBADF);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fifo advisory byte-level locks.
|
||||
*/
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kernfs_vnops.c 8.15 (Berkeley) 5/21/95
|
||||
* $Id: kernfs_vnops.c,v 1.25 1997/10/16 20:32:27 phk Exp $
|
||||
* $Id: kernfs_vnops.c,v 1.26 1997/10/16 22:00:19 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -649,7 +649,7 @@ kernfs_badop()
|
||||
|
||||
vop_t **kernfs_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc kernfs_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_access_desc, (vop_t *) kernfs_access },
|
||||
{ &vop_bmap_desc, (vop_t *) kernfs_badop },
|
||||
{ &vop_getattr_desc, (vop_t *) kernfs_getattr },
|
||||
|
@ -35,7 +35,7 @@
|
||||
*
|
||||
* @(#)portal_vnops.c 8.14 (Berkeley) 5/21/95
|
||||
*
|
||||
* $Id: portal_vnops.c,v 1.25 1997/10/16 20:32:27 phk Exp $
|
||||
* $Id: portal_vnops.c,v 1.26 1997/10/16 22:00:27 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -598,8 +598,8 @@ portal_badop()
|
||||
|
||||
vop_t **portal_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc portal_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_access_desc, (vop_t *) nullop },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_access_desc, (vop_t *) vop_null },
|
||||
{ &vop_bmap_desc, (vop_t *) portal_badop },
|
||||
{ &vop_getattr_desc, (vop_t *) portal_getattr },
|
||||
{ &vop_inactive_desc, (vop_t *) portal_inactive },
|
||||
|
@ -36,7 +36,7 @@
|
||||
*
|
||||
* @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95
|
||||
*
|
||||
* $Id: procfs_vnops.c,v 1.37 1997/10/16 20:32:28 phk Exp $
|
||||
* $Id: procfs_vnops.c,v 1.38 1997/10/16 22:00:36 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -884,7 +884,7 @@ atopid(b, len)
|
||||
*/
|
||||
vop_t **procfs_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc procfs_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) procfs_abortop },
|
||||
{ &vop_access_desc, (vop_t *) procfs_access },
|
||||
{ &vop_advlock_desc, (vop_t *) procfs_badop },
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95
|
||||
* $Id: spec_vnops.c,v 1.48 1997/10/16 20:32:29 phk Exp $
|
||||
* $Id: spec_vnops.c,v 1.49 1997/10/16 22:00:42 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -58,7 +58,6 @@
|
||||
|
||||
#include <miscfs/specfs/specdev.h>
|
||||
|
||||
static int spec_ebadf __P((void));
|
||||
static int spec_getattr __P((struct vop_getattr_args *));
|
||||
static int spec_badop __P((void));
|
||||
static int spec_strategy __P((struct vop_strategy_args *));
|
||||
@ -79,8 +78,8 @@ static int spec_getpages __P((struct vop_getpages_args *));
|
||||
struct vnode *speclisth[SPECHSZ];
|
||||
vop_t **spec_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_access_desc, (vop_t *) spec_ebadf },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_access_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_advlock_desc, (vop_t *) spec_advlock },
|
||||
{ &vop_bmap_desc, (vop_t *) spec_bmap },
|
||||
{ &vop_close_desc, (vop_t *) spec_close },
|
||||
@ -90,7 +89,7 @@ static struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
|
||||
{ &vop_getpages_desc, (vop_t *) spec_getpages },
|
||||
{ &vop_inactive_desc, (vop_t *) spec_inactive },
|
||||
{ &vop_ioctl_desc, (vop_t *) spec_ioctl },
|
||||
{ &vop_lease_desc, (vop_t *) nullop },
|
||||
{ &vop_lease_desc, (vop_t *) vop_null },
|
||||
{ &vop_link_desc, (vop_t *) spec_badop },
|
||||
{ &vop_lookup_desc, (vop_t *) spec_lookup },
|
||||
{ &vop_mkdir_desc, (vop_t *) spec_badop },
|
||||
@ -103,11 +102,11 @@ static struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
|
||||
{ &vop_readdir_desc, (vop_t *) spec_badop },
|
||||
{ &vop_readlink_desc, (vop_t *) spec_badop },
|
||||
{ &vop_reallocblks_desc, (vop_t *) spec_badop },
|
||||
{ &vop_reclaim_desc, (vop_t *) nullop },
|
||||
{ &vop_reclaim_desc, (vop_t *) vop_null },
|
||||
{ &vop_remove_desc, (vop_t *) spec_badop },
|
||||
{ &vop_rename_desc, (vop_t *) spec_badop },
|
||||
{ &vop_rmdir_desc, (vop_t *) spec_badop },
|
||||
{ &vop_setattr_desc, (vop_t *) spec_ebadf },
|
||||
{ &vop_setattr_desc, (vop_t *) vop_ebadf },
|
||||
{ &vop_strategy_desc, (vop_t *) spec_strategy },
|
||||
{ &vop_symlink_desc, (vop_t *) spec_badop },
|
||||
{ &vop_write_desc, (vop_t *) spec_write },
|
||||
@ -696,16 +695,6 @@ spec_advlock(ap)
|
||||
return (ap->a_flags & F_FLOCK ? EOPNOTSUPP : EINVAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Special device failed operation
|
||||
*/
|
||||
static int
|
||||
spec_ebadf()
|
||||
{
|
||||
|
||||
return (EBADF);
|
||||
}
|
||||
|
||||
/*
|
||||
* Special device bad operation
|
||||
*/
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)union_vnops.c 8.32 (Berkeley) 6/23/95
|
||||
* $Id: union_vnops.c,v 1.44 1997/10/15 10:04:54 phk Exp $
|
||||
* $Id: union_vnops.c,v 1.45 1997/10/16 20:32:30 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -1739,7 +1739,7 @@ union_strategy(ap)
|
||||
*/
|
||||
vop_t **union_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc union_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) union_abortop },
|
||||
{ &vop_access_desc, (vop_t *) union_access },
|
||||
{ &vop_advlock_desc, (vop_t *) union_advlock },
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: msdosfs_vnops.c,v 1.49 1997/10/16 20:32:31 phk Exp $ */
|
||||
/* $Id: msdosfs_vnops.c,v 1.50 1997/10/17 12:36:17 phk Exp $ */
|
||||
/* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */
|
||||
|
||||
/*-
|
||||
@ -1833,7 +1833,7 @@ msdosfs_pathconf(ap)
|
||||
/* Global vfs data structures for msdosfs */
|
||||
vop_t **msdosfs_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) msdosfs_abortop },
|
||||
{ &vop_access_desc, (vop_t *) msdosfs_access },
|
||||
{ &vop_bmap_desc, (vop_t *) msdosfs_bmap },
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
|
||||
* $Id: nfs_vnops.c,v 1.68 1997/10/16 20:32:32 phk Exp $
|
||||
* $Id: nfs_vnops.c,v 1.69 1997/10/16 22:00:51 phk Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -133,7 +133,7 @@ static int nfs_bwrite __P((struct vop_bwrite_args *));
|
||||
*/
|
||||
vop_t **nfsv2_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) nfs_abortop },
|
||||
{ &vop_access_desc, (vop_t *) nfs_access },
|
||||
{ &vop_advlock_desc, (vop_t *) nfs_advlock },
|
||||
@ -145,7 +145,7 @@ static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
|
||||
{ &vop_getattr_desc, (vop_t *) nfs_getattr },
|
||||
{ &vop_getpages_desc, (vop_t *) nfs_getpages },
|
||||
{ &vop_inactive_desc, (vop_t *) nfs_inactive },
|
||||
{ &vop_lease_desc, (vop_t *) nullop },
|
||||
{ &vop_lease_desc, (vop_t *) vop_null },
|
||||
{ &vop_link_desc, (vop_t *) nfs_link },
|
||||
{ &vop_lock_desc, (vop_t *) vop_sharedlock },
|
||||
{ &vop_lookup_desc, (vop_t *) nfs_lookup },
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
|
||||
* $Id: nfs_vnops.c,v 1.68 1997/10/16 20:32:32 phk Exp $
|
||||
* $Id: nfs_vnops.c,v 1.69 1997/10/16 22:00:51 phk Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -133,7 +133,7 @@ static int nfs_bwrite __P((struct vop_bwrite_args *));
|
||||
*/
|
||||
vop_t **nfsv2_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_abortop_desc, (vop_t *) nfs_abortop },
|
||||
{ &vop_access_desc, (vop_t *) nfs_access },
|
||||
{ &vop_advlock_desc, (vop_t *) nfs_advlock },
|
||||
@ -145,7 +145,7 @@ static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
|
||||
{ &vop_getattr_desc, (vop_t *) nfs_getattr },
|
||||
{ &vop_getpages_desc, (vop_t *) nfs_getpages },
|
||||
{ &vop_inactive_desc, (vop_t *) nfs_inactive },
|
||||
{ &vop_lease_desc, (vop_t *) nullop },
|
||||
{ &vop_lease_desc, (vop_t *) vop_null },
|
||||
{ &vop_link_desc, (vop_t *) nfs_link },
|
||||
{ &vop_lock_desc, (vop_t *) vop_sharedlock },
|
||||
{ &vop_lookup_desc, (vop_t *) nfs_lookup },
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vnode.h 8.7 (Berkeley) 2/4/94
|
||||
* $Id: vnode.h,v 1.53 1997/10/17 12:36:18 phk Exp $
|
||||
* $Id: vnode.h,v 1.54 1997/10/26 20:26:14 phk Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_VNODE_H_
|
||||
@ -478,7 +478,6 @@ int vinvalbuf __P((struct vnode *vp, int save, struct ucred *cred,
|
||||
void vprint __P((char *label, struct vnode *vp));
|
||||
int vrecycle __P((struct vnode *vp, struct simplelock *inter_lkp,
|
||||
struct proc *p));
|
||||
int vn_bwrite __P((struct vop_bwrite_args *ap));
|
||||
int vn_close __P((struct vnode *vp,
|
||||
int flags, struct ucred *cred, struct proc *p));
|
||||
int vn_lock __P((struct vnode *vp, int flags, struct proc *p));
|
||||
@ -491,6 +490,7 @@ int vfs_cache_lookup __P((struct vop_lookup_args *ap));
|
||||
int vfs_object_create __P((struct vnode *vp, struct proc *p,
|
||||
struct ucred *cred, int waslocked));
|
||||
int vn_writechk __P((struct vnode *vp));
|
||||
int vop_stdbwrite __P((struct vop_bwrite_args *ap));
|
||||
int vop_stdislocked __P((struct vop_islocked_args *));
|
||||
int vop_stdlock __P((struct vop_lock_args *));
|
||||
int vop_stdunlock __P((struct vop_unlock_args *));
|
||||
@ -508,14 +508,13 @@ int vop_enotty __P((struct vop_generic_args *ap));
|
||||
int vop_defaultop __P((struct vop_generic_args *ap));
|
||||
int vop_null __P((struct vop_generic_args *ap));
|
||||
|
||||
/* XXX: compat until fixed all places*/
|
||||
#define vn_default_error vop_defaultop
|
||||
|
||||
struct vnode *
|
||||
checkalias __P((struct vnode *vp, dev_t nvp_rdev, struct mount *mp));
|
||||
void vput __P((struct vnode *vp));
|
||||
void vref __P((struct vnode *vp));
|
||||
void vrele __P((struct vnode *vp));
|
||||
|
||||
extern vop_t **default_vnodeop_p;
|
||||
#endif /* KERNEL */
|
||||
|
||||
#endif /* !_SYS_VNODE_H_ */
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)mfs_vnops.c 8.11 (Berkeley) 5/22/95
|
||||
* $Id: mfs_vnops.c,v 1.28 1997/10/19 01:36:49 dyson Exp $
|
||||
* $Id: mfs_vnops.c,v 1.29 1997/10/20 19:53:26 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -70,6 +70,7 @@ static struct vnodeopv_entry_desc mfs_vnodeop_entries[] = {
|
||||
{ &vop_bwrite_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_close_desc, (vop_t *) mfs_close },
|
||||
{ &vop_fsync_desc, (vop_t *) mfs_fsync },
|
||||
{ &vop_getpages_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_inactive_desc, (vop_t *) mfs_inactive },
|
||||
{ &vop_ioctl_desc, (vop_t *) vop_enotty },
|
||||
{ &vop_islocked_desc, (vop_t *) vop_defaultop },
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95
|
||||
* $Id: ufs_vnops.c,v 1.62 1997/10/16 20:32:39 phk Exp $
|
||||
* $Id: ufs_vnops.c,v 1.63 1997/10/17 12:36:19 phk Exp $
|
||||
*/
|
||||
|
||||
#include "opt_quota.h"
|
||||
@ -2081,7 +2081,7 @@ ufs_missingop(ap)
|
||||
/* Global vfs data structures for ufs. */
|
||||
vop_t **ufs_vnodeop_p;
|
||||
static struct vnodeopv_entry_desc ufs_vnodeop_entries[] = {
|
||||
{ &vop_default_desc, (vop_t *) vn_default_error },
|
||||
{ &vop_default_desc, (vop_t *) vop_defaultop },
|
||||
{ &vop_fsync_desc, (vop_t *) ufs_missingop },
|
||||
{ &vop_getpages_desc, (vop_t *) ufs_missingop },
|
||||
{ &vop_read_desc, (vop_t *) ufs_missingop },
|
||||
|
Loading…
Reference in New Issue
Block a user