tmpfs: remove IFF macro

Requested by:	mjg
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D38576
This commit is contained in:
Konstantin Belousov 2023-02-14 01:47:44 +02:00
parent 9ff2fbdf2d
commit b918ee2ce4
2 changed files with 2 additions and 3 deletions

View file

@ -516,7 +516,6 @@ tmpfs_update(struct vnode *vp)
* Convenience macros to simplify some logical expressions.
*/
#define IMPLIES(a, b) (!(a) || (b))
#define IFF(a, b) (IMPLIES(a, b) && IMPLIES(b, a))
/*
* Checks that the directory entry pointed by 'de' matches the name 'name'

View file

@ -547,8 +547,8 @@ tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *tmp, enum vtype type,
* allocated, this must be the request to do it. */
MPASS(IMPLIES(tmp->tm_root == NULL, parent == NULL && type == VDIR));
MPASS(IFF(type == VLNK, target != NULL));
MPASS(IFF(type == VBLK || type == VCHR, rdev != VNOVAL));
MPASS((type == VLNK) ^ (target == NULL));
MPASS((type == VBLK || type == VCHR) ^ (rdev == VNOVAL));
if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max)
return (ENOSPC);