From owner-svn-src-all@freebsd.org Thu Dec 19 16:39:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0068D1E4B9B; Thu, 19 Dec 2019 16:39:52 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47dyK45v8jz3MVw; Thu, 19 Dec 2019 16:39:52 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C157019691; Thu, 19 Dec 2019 16:39:52 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBJGdqdC075458; Thu, 19 Dec 2019 16:39:52 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJGdqkQ075457; Thu, 19 Dec 2019 16:39:52 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201912191639.xBJGdqkQ075457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Thu, 19 Dec 2019 16:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355913 - head/sys/fs/tmpfs X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/fs/tmpfs X-SVN-Commit-Revision: 355913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 16:39:53 -0000 Author: dougm Date: Thu Dec 19 16:39:52 2019 New Revision: 355913 URL: https://svnweb.freebsd.org/changeset/base/355913 Log: Including 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 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_ */