mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
vfs_lookup.c: only call ktrcapfail() if KTRACE is enabled
Reviewed by: emaste, imp, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44931
This commit is contained in:
parent
66df81021e
commit
6b0cf2a237
|
@ -86,8 +86,14 @@ static void NDVALIDATE_impl(struct nameidata *, int);
|
|||
ndp->ni_cnd.cn_flags |= ISRESTARTED; \
|
||||
} while (0)
|
||||
|
||||
#ifdef KTRACE
|
||||
#define NIKTRCAPFAIL(path) ktrcapfail(CAPFAIL_NAMEI, (path))
|
||||
#else
|
||||
#define NIKTRCAPFAIL(path)
|
||||
#endif
|
||||
|
||||
#define NI_CAP_VIOLATION(ndp, path) do { \
|
||||
ktrcapfail(CAPFAIL_NAMEI, (path)); \
|
||||
NIKTRCAPFAIL(path); \
|
||||
(ndp)->ni_lcf &= ~NI_LCF_KTR_FLAGS; \
|
||||
} while (0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue