diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1998-08-06 19:35:18 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1998-08-06 19:35:18 +0000 |
commit | 89fedd1a8d2624bae7d2310a83d39156079353b6 (patch) | |
tree | 85d9d00a998016639251d59ff97e2a4df0bfa685 /sys/ufs | |
parent | 67f0f9ef8777688f212974c7fd984398c1827902 (diff) |
Rename vop_revoke, vn_bwrite, vop_noislocked, vop_nolock, vop_nounlock
to be vop_generic_revoke, vop_generic_bwrite, vop_generic_islocked,
vop_generic_lock and vop_generic_unlock.
Create vop_generic_abortop and propogate change to all file systems.
Fix PR/371.
Get rid of locking in NULLFS (should be mostly unnecessary now except for
forced unmounts).
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_vnops.c | 10 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 12 | ||||
-rw-r--r-- | sys/ufs/mfs/mfs_extern.h | 4 | ||||
-rw-r--r-- | sys/ufs/mfs/mfsnode.h | 10 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_extern.h | 5 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 20 |
6 files changed, 21 insertions, 40 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c index 7a8755fb7a9..52ec17a9887 100644 --- a/sys/ufs/ext2fs/ext2fs_vnops.c +++ b/sys/ufs/ext2fs/ext2fs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vnops.c,v 1.7 1998/07/28 00:13:15 millert Exp $ */ +/* $OpenBSD: ext2fs_vnops.c,v 1.8 1998/08/06 19:35:04 csapuntz Exp $ */ /* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */ /* @@ -1440,7 +1440,7 @@ struct vnodeopv_entry_desc ext2fs_vnodeop_entries[] = { { &vop_symlink_desc, ext2fs_symlink }, /* symlink */ { &vop_readdir_desc, ext2fs_readdir }, /* readdir */ { &vop_readlink_desc, ext2fs_readlink },/* readlink */ - { &vop_abortop_desc, ufs_abortop }, /* abortop */ + { &vop_abortop_desc, vop_generic_abortop }, /* abortop */ { &vop_inactive_desc, ext2fs_inactive },/* inactive */ { &vop_reclaim_desc, ext2fs_reclaim }, /* reclaim */ { &vop_lock_desc, ufs_lock }, /* lock */ @@ -1456,7 +1456,7 @@ struct vnodeopv_entry_desc ext2fs_vnodeop_entries[] = { { &vop_vfree_desc, ext2fs_vfree }, /* vfree */ { &vop_truncate_desc, ext2fs_truncate },/* truncate */ { &vop_update_desc, ext2fs_update }, /* update */ - { &vop_bwrite_desc, vn_bwrite }, /* bwrite */ + { &vop_bwrite_desc, vop_generic_bwrite }, /* bwrite */ { (struct vnodeop_desc*)NULL, (int(*) __P((void*)))NULL } }; struct vnodeopv_desc ext2fs_vnodeop_opv_desc = @@ -1505,7 +1505,7 @@ struct vnodeopv_entry_desc ext2fs_specop_entries[] = { { &vop_vfree_desc, ext2fs_vfree }, /* vfree */ { &vop_truncate_desc, spec_truncate }, /* truncate */ { &vop_update_desc, ext2fs_update }, /* update */ - { &vop_bwrite_desc, vn_bwrite }, /* bwrite */ + { &vop_bwrite_desc, vop_generic_bwrite }, /* bwrite */ { (struct vnodeop_desc*)NULL, (int(*) __P((void *)))NULL } }; struct vnodeopv_desc ext2fs_specop_opv_desc = @@ -1555,7 +1555,7 @@ struct vnodeopv_entry_desc ext2fs_fifoop_entries[] = { { &vop_vfree_desc, ext2fs_vfree }, /* vfree */ { &vop_truncate_desc, fifo_truncate }, /* truncate */ { &vop_update_desc, ext2fs_update }, /* update */ - { &vop_bwrite_desc, vn_bwrite }, /* bwrite */ + { &vop_bwrite_desc, vop_generic_bwrite }, /* bwrite */ { (struct vnodeop_desc*)NULL, (int(*) __P((void *)))NULL } }; struct vnodeopv_desc ext2fs_fifoop_opv_desc = diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index aed41770ab6..6224aad25a0 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vnops.c,v 1.6 1997/11/06 05:59:20 csapuntz Exp $ */ +/* $OpenBSD: ffs_vnops.c,v 1.7 1998/08/06 19:35:07 csapuntz Exp $ */ /* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */ /* @@ -94,7 +94,7 @@ struct vnodeopv_entry_desc ffs_vnodeop_entries[] = { { &vop_symlink_desc, ufs_symlink }, /* symlink */ { &vop_readdir_desc, ufs_readdir }, /* readdir */ { &vop_readlink_desc, ufs_readlink }, /* readlink */ - { &vop_abortop_desc, ufs_abortop }, /* abortop */ + { &vop_abortop_desc, vop_generic_abortop }, /* abortop */ { &vop_inactive_desc, ufs_inactive }, /* inactive */ { &vop_reclaim_desc, ffs_reclaim }, /* reclaim */ { &vop_lock_desc, ufs_lock }, /* lock */ @@ -112,7 +112,7 @@ struct vnodeopv_entry_desc ffs_vnodeop_entries[] = { { &vop_vfree_desc, ffs_vfree }, /* vfree */ { &vop_truncate_desc, ffs_truncate }, /* truncate */ { &vop_update_desc, ffs_update }, /* update */ - { &vop_bwrite_desc, vn_bwrite }, + { &vop_bwrite_desc, vop_generic_bwrite }, { (struct vnodeop_desc*)NULL, (int(*) __P((void*)))NULL } }; struct vnodeopv_desc ffs_vnodeop_opv_desc = @@ -134,7 +134,7 @@ struct vnodeopv_entry_desc ffs_specop_entries[] = { { &vop_lease_desc, spec_lease_check }, /* lease */ { &vop_ioctl_desc, spec_ioctl }, /* ioctl */ { &vop_select_desc, spec_select }, /* select */ - { &vop_revoke_desc, spec_revoke }, /* revoke */ + { &vop_revoke_desc, spec_revoke }, /* revoke */ { &vop_mmap_desc, spec_mmap }, /* mmap */ { &vop_fsync_desc, ffs_fsync }, /* fsync */ { &vop_seek_desc, spec_seek }, /* seek */ @@ -163,7 +163,7 @@ struct vnodeopv_entry_desc ffs_specop_entries[] = { { &vop_vfree_desc, ffs_vfree }, /* vfree */ { &vop_truncate_desc, spec_truncate }, /* truncate */ { &vop_update_desc, ffs_update }, /* update */ - { &vop_bwrite_desc, vn_bwrite }, + { &vop_bwrite_desc, vop_generic_bwrite }, { (struct vnodeop_desc*)NULL, (int(*) __P((void *)))NULL } }; struct vnodeopv_desc ffs_specop_opv_desc = @@ -215,7 +215,7 @@ struct vnodeopv_entry_desc ffs_fifoop_entries[] = { { &vop_vfree_desc, ffs_vfree }, /* vfree */ { &vop_truncate_desc, fifo_truncate }, /* truncate */ { &vop_update_desc, ffs_update }, /* update */ - { &vop_bwrite_desc, vn_bwrite }, + { &vop_bwrite_desc, vop_generic_bwrite }, { (struct vnodeop_desc*)NULL, (int(*) __P((void *)))NULL } }; struct vnodeopv_desc ffs_fifoop_opv_desc = diff --git a/sys/ufs/mfs/mfs_extern.h b/sys/ufs/mfs/mfs_extern.h index a2c7840b1aa..6adbf5a77f8 100644 --- a/sys/ufs/mfs/mfs_extern.h +++ b/sys/ufs/mfs/mfs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mfs_extern.h,v 1.6 1998/02/08 22:41:52 tholo Exp $ */ +/* $OpenBSD: mfs_extern.h,v 1.7 1998/08/06 19:35:09 csapuntz Exp $ */ /* $NetBSD: mfs_extern.h,v 1.4 1996/02/09 22:31:27 christos Exp $ */ /*- @@ -66,7 +66,7 @@ int mfs_close __P((void *)); int mfs_inactive __P((void *)); int mfs_reclaim __P((void *)); int mfs_print __P((void *)); -#define mfs_revoke vop_revoke +#define mfs_revoke vop_generic_revoke int mfs_badop __P((void *)); __END_DECLS diff --git a/sys/ufs/mfs/mfsnode.h b/sys/ufs/mfs/mfsnode.h index a0c77d26fae..cdae3c783a2 100644 --- a/sys/ufs/mfs/mfsnode.h +++ b/sys/ufs/mfs/mfsnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mfsnode.h,v 1.6 1997/11/06 05:59:24 csapuntz Exp $ */ +/* $OpenBSD: mfsnode.h,v 1.7 1998/08/06 19:35:11 csapuntz Exp $ */ /* $NetBSD: mfsnode.h,v 1.3 1996/02/09 22:31:31 christos Exp $ */ /* @@ -76,9 +76,9 @@ struct mfsnode { #define mfs_readdir mfs_badop #define mfs_readlink mfs_badop #define mfs_abortop mfs_badop -#define mfs_lock vop_nolock -#define mfs_unlock vop_nounlock -#define mfs_islocked vop_noislocked +#define mfs_lock vop_generic_lock +#define mfs_unlock vop_generic_unlock +#define mfs_islocked vop_generic_islocked #define mfs_pathconf mfs_badop #define mfs_advlock mfs_badop #define mfs_blkatoff mfs_badop @@ -86,4 +86,4 @@ struct mfsnode { #define mfs_vfree mfs_badop #define mfs_truncate mfs_badop #define mfs_update nullop -#define mfs_bwrite vn_bwrite +#define mfs_bwrite vop_generic_bwrite diff --git a/sys/ufs/ufs/ufs_extern.h b/sys/ufs/ufs/ufs_extern.h index 0eeb1cfb608..ee97c01a7c8 100644 --- a/sys/ufs/ufs/ufs_extern.h +++ b/sys/ufs/ufs/ufs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_extern.h,v 1.7 1998/01/09 20:38:03 csapuntz Exp $ */ +/* $OpenBSD: ufs_extern.h,v 1.8 1998/08/06 19:35:13 csapuntz Exp $ */ /* $NetBSD: ufs_extern.h,v 1.5 1996/02/09 22:36:03 christos Exp $ */ /*- @@ -58,7 +58,6 @@ struct vfsconf; struct vnode; __BEGIN_DECLS -int ufs_abortop __P((void *)); int ufs_access __P((void *)); int ufs_advlock __P((void *)); int ufs_bmap __P((void *)); @@ -87,7 +86,7 @@ int ufs_readdir __P((void *)); int ufs_readlink __P((void *)); int ufs_remove __P((void *)); int ufs_rename __P((void *)); -#define ufs_revoke vop_revoke +#define ufs_revoke vop_generic_revoke int ufs_rmdir __P((void *)); int ufs_seek __P((void *)); int ufs_select __P((void *)); diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index b2a9db37120..2c755bbc5b8 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_vnops.c,v 1.19 1998/07/28 00:13:18 millert Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.20 1998/08/06 19:35:15 csapuntz Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -1613,24 +1613,6 @@ ufs_readlink(v) } /* - * Ufs abort op, called after namei() when a CREATE/DELETE isn't actually - * done. If a buffer has been saved in anticipation of a CREATE, delete it. - */ -/* ARGSUSED */ -int -ufs_abortop(v) - void *v; -{ - struct vop_abortop_args /* { - struct vnode *a_dvp; - struct componentname *a_cnp; - } */ *ap = v; - if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF) - FREE(ap->a_cnp->cn_pnbuf, M_NAMEI); - return (0); -} - -/* * Lock an inode. If its already locked, set the WANT bit and sleep. */ int |