summaryrefslogtreecommitdiffstats
path: root/sys/fs/tmpfs/tmpfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/tmpfs/tmpfs.h')
-rw-r--r--sys/fs/tmpfs/tmpfs.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h
index 8661f42..37e5bbb 100644
--- a/sys/fs/tmpfs/tmpfs.h
+++ b/sys/fs/tmpfs/tmpfs.h
@@ -383,7 +383,9 @@ struct tmpfs_mount {
uma_zone_t tm_node_pool;
/* Read-only status. */
- int tm_ronly;
+ bool tm_ronly;
+ /* Do not use namecache. */
+ bool tm_nonc;
};
#define TMPFS_LOCK(tm) mtx_lock(&(tm)->tm_allnode_lock)
#define TMPFS_UNLOCK(tm) mtx_unlock(&(tm)->tm_allnode_lock)
@@ -528,4 +530,11 @@ VP_TO_TMPFS_DIR(struct vnode *vp)
return (node);
}
+static inline bool
+tmpfs_use_nc(struct vnode *vp)
+{
+
+ return (!(VFS_TO_TMPFS(vp->v_mount)->tm_nonc));
+}
+
#endif /* _FS_TMPFS_TMPFS_H_ */
OpenPOWER on IntegriCloud