svn commit: r355913 - head/sys/fs/tmpfs
Doug Moore
dougm at FreeBSD.org
Thu Dec 19 16:39:53 UTC 2019
Author: dougm
Date: Thu Dec 19 16:39:52 2019
New Revision: 355913
URL: https://svnweb.freebsd.org/changeset/base/355913
Log:
Including <sys/tmpfs.h> into non-kernel software leads to a
compilation error because, without _KERNEL defined, the macro
TMPFS_VALIDATE_DIR is invoked, but never defined. User-level software
that includes sys/tmpfs.h must define _KERNEL to make the definition
of TMPFS_VALIDATE_DIR visible.
This change puts all the inline functions that, directly or
indirectly, invoke MPASS into the scope of the _KERNEL block, allowing
many user-space includers of <sys/tmpfs.h> to stop defining _KERNEL.
Reviewed by: alc, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D22874
Modified:
head/sys/fs/tmpfs/tmpfs.h
Modified: head/sys/fs/tmpfs/tmpfs.h
==============================================================================
--- head/sys/fs/tmpfs/tmpfs.h Thu Dec 19 15:36:00 2019 (r355912)
+++ head/sys/fs/tmpfs/tmpfs.h Thu Dec 19 16:39:52 2019 (r355913)
@@ -493,8 +493,6 @@ size_t tmpfs_pages_used(struct tmpfs_mount *tmp);
void tmpfs_subr_init(void);
void tmpfs_subr_uninit(void);
-#endif
-
/*
* Macros/functions to convert from generic data structures to tmpfs
* specific ones.
@@ -536,5 +534,6 @@ tmpfs_use_nc(struct vnode *vp)
return (!(VFS_TO_TMPFS(vp->v_mount)->tm_nonc));
}
+#endif /* _KERNEL */
#endif /* _FS_TMPFS_TMPFS_H_ */
More information about the svn-src-head
mailing list