summaryrefslogtreecommitdiff
path: root/sys/fs/tmpfs
diff options
context:
space:
mode:
authorjmmv <jmmv@NetBSD.org>2005-12-24 12:31:57 +0000
committerjmmv <jmmv@NetBSD.org>2005-12-24 12:31:57 +0000
commitf37f56be99e204d5bbadd4cf3e8518452cdcbb86 (patch)
tree9799ba3a52ddde838502eb911a896416a54641b3 /sys/fs/tmpfs
parent9abe0ed18f5d33375f6b823ecc3bcefb4e80f00e (diff)
Remove a conditional by always using inlined functions in favour of macros.
This way, the code is clearer and there shouldn't be any performance difference (if the compiler DTRT). Suggested by chs@.
Diffstat (limited to 'sys/fs/tmpfs')
-rw-r--r--sys/fs/tmpfs/tmpfs.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h
index 6803dd80f35..71b7a4c2b49 100644
--- a/sys/fs/tmpfs/tmpfs.h
+++ b/sys/fs/tmpfs/tmpfs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs.h,v 1.12 2005/12/11 12:24:29 christos Exp $ */
+/* $NetBSD: tmpfs.h,v 1.13 2005/12/24 12:31:57 jmmv Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -408,14 +408,8 @@ TMPFS_PAGES_MAX(struct tmpfs_mount *tmp)
/*
* Macros/functions to convert from generic data structures to tmpfs
* specific ones.
- *
- * Macros are used when no sanity checks have to be done, as they provide
- * the fastest conversion. On the other hand, inlined functions are used
- * when expensive sanity checks are enabled, mostly because the checks
- * have to be done separately from the return value.
*/
-#if defined(DIAGNOSTIC)
static inline
struct tmpfs_mount *
VFS_TO_TMPFS(struct mount *mp)
@@ -448,11 +442,6 @@ VP_TO_TMPFS_DIR(struct vnode *vp)
TMPFS_VALIDATE_DIR(node);
return node;
}
-#else
-# define VFS_TO_TMPFS(mp) ((struct tmpfs_mount *)mp->mnt_data)
-# define VP_TO_TMPFS_NODE(vp) ((struct tmpfs_node *)vp->v_data)
-# define VP_TO_TMPFS_DIR(vp) VP_TO_TMPFS_NODE(vp)
-#endif
#endif /* _KERNEL */