From nobody Sun Feb 19 05:47:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PKF1k1zPsz3smWK; Sun, 19 Feb 2023 05:47:22 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PKF1j6zXRz3LQF; Sun, 19 Feb 2023 05:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676785642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4q6fVlxEmlUg6IV7lMRx7izikmqr9MQnvmOqvFYuCNg=; b=x1MgYvOi9jmTH/OfMOWa5jvgV6geS1f+0WtIRVhfPrrNSClIKThZvyTaAXuIPW5RDU++0N OFe2w7XbH4nzB8vYQgWofScGa+SK2UzHAwf0UysVZbYXsws8ff7tsDBcIyV8oySmAAQk4/ hoooJUhrLrnzJ5jGMXUcWUcijrbNiOSh36JrqaVjP0rl1pfu5z7O3641UHEcXgF/dHdOp3 EciuPVkwZ752NlwcT2oQ5uzRw2ms2Ayl3nRZv9n5KQ2vt804sP/SPmkhVFQUEK7fsc+K+p 1xqeyXN0kRp+p9XeafY5SkLJB4b6K4OUNCNvCJla0nL9rSLkiKqRg1smW2hY8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676785642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4q6fVlxEmlUg6IV7lMRx7izikmqr9MQnvmOqvFYuCNg=; b=AwZTvnxrc/nB+hIbs3Iz4iDZzdvDjgNyuEzDaHYyZ8gmiZW34P4f4lN4QYADTwT1err/VM AKes9aoyIdL0NoAZ6MQOSWvcdoWxqIkhtfCMdEgz3/0j5mpxGjNpCiKXMqqGDI7ajjTVdE u6BgKEr7ctL94dmC98KXunJ9xzL2DP3MdvS2e96OtaVu7JDlq6TQgk4zAdg5ptrQSuvGzf MvHVoQ25Mb4yP07EhGTtbaUtloI8841w3gBQcgZuplDYx+3oXu/XisQsR34mg4fEdj7POA emGtu9OydlQkVmLeSacHNroH6pltWhGDWkUrTgyodoUKa0rkHVBhp9x9nubKzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676785642; a=rsa-sha256; cv=none; b=T6bVghiHtP/2qAU1WW1asBoApFdmnbUX1gYeRXG53foliRYWhK88hxX8N16D5MRT8sS39C h3XctIiyVbBYfUWsQ8Ei4v9G/MARyFkTd4OGEQaWtJRSW07HHiRqVDxG5imPSJlYYN7e1z jp3UnK4+0fNgfhPq1b2jpbCDnDezcOlUCAtFzkqEks5Lw/dq7uPhU6lIvpEfE+cb/O2PXi tdnXRis/9g6p+koc6evNhMN/yxNPS0g0CLWKcMG3XBK1tkfLEKbWpEyicZGV8eMDEYbsZf Buena6+LFHIHXaXQf+S3EbU2X1pNH1paamKS9sLd3nqXnbb+RffUFDgRVOY4ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PKF1j65shzr8m; Sun, 19 Feb 2023 05:47:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31J5lLLg097247; Sun, 19 Feb 2023 05:47:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31J5lLwC097246; Sun, 19 Feb 2023 05:47:21 GMT (envelope-from git) Date: Sun, 19 Feb 2023 05:47:21 GMT Message-Id: <202302190547.31J5lLwC097246@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e6bc80a3dedc - stable/13 - tmpfs: remove IFF macro List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e6bc80a3dedce1a45357880963695dc74bdc63cf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e6bc80a3dedce1a45357880963695dc74bdc63cf commit e6bc80a3dedce1a45357880963695dc74bdc63cf Author: Konstantin Belousov AuthorDate: 2023-02-13 23:47:44 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-19 05:16:25 +0000 tmpfs: remove IFF macro (cherry picked from commit b918ee2ce4850253ddd884e39dabecd6e96bf474) --- sys/fs/tmpfs/tmpfs.h | 1 - sys/fs/tmpfs/tmpfs_subr.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h index 30c80ad70d48..e7928d4bf9dd 100644 --- a/sys/fs/tmpfs/tmpfs.h +++ b/sys/fs/tmpfs/tmpfs.h @@ -490,7 +490,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' diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 351530a56698..bc9e1f08391b 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -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);