diff options
author | Doug Moore <dougm@FreeBSD.org> | 2019-12-19 16:39:52 +0000 |
---|---|---|
committer | Doug Moore <dougm@FreeBSD.org> | 2019-12-19 16:39:52 +0000 |
commit | f9f4c60aa71c52e16cab54eed9b30c1b04fec1bc (patch) | |
tree | 620bfcfdca3fd1396496661b2b80c170277c08c5 | |
parent | 9b078661c440d2f53a9161beeca65d02741714a4 (diff) | |
download | src-f9f4c60aa71c52e16cab54eed9b30c1b04fec1bc.tar.gz src-f9f4c60aa71c52e16cab54eed9b30c1b04fec1bc.zip |
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
Notes
Notes:
svn path=/head/; revision=355913
-rw-r--r-- | sys/fs/tmpfs/tmpfs.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h index 651cd126cc23..4916be6c5f19 100644 --- a/sys/fs/tmpfs/tmpfs.h +++ b/sys/fs/tmpfs/tmpfs.h @@ -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_ */ |