summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/ffs_vnops.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-08-26 07:32:51 +0000
committerphk <phk@FreeBSD.org>1997-08-26 07:32:51 +0000
commitfddfc9d5bb4c35d88417fa80a062219876186593 (patch)
tree7f29931e5661e3731f6b972dc3a9508534617833 /sys/ufs/ffs/ffs_vnops.c
parentf320b3a30651cae7b34067561adb48f2b6f57621 (diff)
downloadFreeBSD-src-fddfc9d5bb4c35d88417fa80a062219876186593.zip
FreeBSD-src-fddfc9d5bb4c35d88417fa80a062219876186593.tar.gz
Uncut&paste cache_lookup().
This unifies several times in theory indentical 50 lines of code. The filesystems have a new method: vop_cachedlookup, which is the meat of the lookup, and use vfs_cache_lookup() for their vop_lookup method. vfs_cache_lookup() will check the namecache and pass on to the vop_cachedlookup method in case of a miss. It's still the task of the individual filesystems to populate the namecache with cache_enter(). Filesystems that do not use the namecache will just provide the vop_lookup method as usual.
Diffstat (limited to 'sys/ufs/ffs/ffs_vnops.c')
-rw-r--r--sys/ufs/ffs/ffs_vnops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 341a428..35274bf 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_vnops.c 8.15 (Berkeley) 5/14/95
- * $Id: ffs_vnops.c,v 1.25 1997/03/22 06:53:30 bde Exp $
+ * $Id: ffs_vnops.c,v 1.26 1997/08/25 08:18:23 kato Exp $
*/
#include <sys/param.h>
@@ -78,7 +78,8 @@ static int ffs_write __P((struct vop_write_args *));
vop_t **ffs_vnodeop_p;
static struct vnodeopv_entry_desc ffs_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *)vn_default_error },
- { &vop_lookup_desc, (vop_t *)ufs_lookup }, /* lookup */
+ { &vop_lookup_desc, (vop_t *)vfs_cache_lookup },/* lookup */
+ { &vop_cachedlookup_desc, (vop_t *)ufs_lookup },/* cachedlookup */
{ &vop_create_desc, (vop_t *)ufs_create }, /* create */
{ &vop_whiteout_desc, (vop_t *)ufs_whiteout }, /* whiteout */
{ &vop_mknod_desc, (vop_t *)ufs_mknod }, /* mknod */
OpenPOWER on IntegriCloud