From nobody Tue Jun 21 13:02:38 2022 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 C6EBC873316; Tue, 21 Jun 2022 13:02:38 +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 4LS6B653LTz3qy1; Tue, 21 Jun 2022 13:02:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655816558; 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=Avc15s99KpYXM21WPxvLL2gvDLs6HUF75tdGtXB35/c=; b=yLatS5n36XjB7wTAVRCxp0o2Ne8j7bwn6oC8QAWhxMA3xOJLeNVmBcMt2pKVbtqBirkWqm OYQXJkw3CY94lymtX0/etgIyawBJ/t1oWeL7E1OnyvkDQRetXsPcpO4oe/SVNIQx+i1643 Mq1N08NXkm8KNjTMc/I1sRint0OmG+b7kVxyAuY/SpSt2ngiZefi2uCUZdhxfHvze1eJWJ dbdM8ZtEj6uMtNr0i/DjSJGi3ALPAgPK64NZnzrNcIyddiZq5BoyJpeVkxIryg8lM5/W0a 38O7Xl97wVa0CLqU2upkR6rjfYnJvQX9LSpDeAki/o1OEPjLZxlM5mMAG4Dwig== 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 8DD7F121C2; Tue, 21 Jun 2022 13:02:38 +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 25LD2csR073621; Tue, 21 Jun 2022 13:02:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25LD2c2I073620; Tue, 21 Jun 2022 13:02:38 GMT (envelope-from git) Date: Tue, 21 Jun 2022 13:02:38 GMT Message-Id: <202206211302.25LD2c2I073620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c75a5bc2f679 - stable/13 - vm_object: Use the vm_object_(set|clear)_flag() helpers 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c75a5bc2f679d4d4b9324640ea0dfbd716530137 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655816558; 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=Avc15s99KpYXM21WPxvLL2gvDLs6HUF75tdGtXB35/c=; b=GHmP5S8vESw1J762SdP/RqS4dT3n2mJI+D6Azd6G/fGuB35Z3F4e9NQVJ7DRFVeC3zmdII fwhGoE7/KLo7vTFIR9n7Z54iOPtCMd4NhI90KGIUaGDZDZ/dAFr8a3F22BReOqiulZwK5h azM3U5IIjkWV83OvH1hx6bDi/258F7B7XoxOBf/fKrfeVBZmEs7/xIWKN8GIwLlLel8JrP xYRhMqZsax9rb55GECyfCfvtVSAewTxpu6S4Y6WQcGeDyaxLZjIXphQiFpDZvysmGLroev dV7zouGG7yuNKIBAv5LMW872MdGLKy7ia9iBI0jxVVSlN2/W/DK+UIE8nvCvqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655816558; a=rsa-sha256; cv=none; b=xUsSAWS+DPbEeAu3oUqKRTQA6XATBVVrFkDrAL7sOZ7CeLfCvfuT6H3uBxwRJtpGU34udP RqtRm8ZTP9e6W6lD7T4pNeCAJZ0Sn/hJO8rtQBIi9E9pjvuW/fp1PBOxt0amNGexOAwbvA gKSnqNbQsK7eCo7IJrdjm30cmfLzMlM4DFqKCxG3ToPdaCMKTlT6s3uy6c1io/V/cBpBxa dj+T1JNWEbqpqjLBYWa8b97NERteHJ1XGIxOje0152g2nSj1by+3QWVxwKvNU/VHZuYU5q WtW66N0axAlA4f2CggSXMAC+6lerEX1QFa7g6NqfiEzheqjNFVvuuG3HLyttow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c75a5bc2f679d4d4b9324640ea0dfbd716530137 commit c75a5bc2f679d4d4b9324640ea0dfbd716530137 Author: Mark Johnston AuthorDate: 2022-06-14 15:35:20 +0000 Commit: Mark Johnston CommitDate: 2022-06-21 12:53:24 +0000 vm_object: Use the vm_object_(set|clear)_flag() helpers ... rather than setting and clearing flags inline. No functional change intended. Reviewed by: alc, kib Sponsored by: The FreeBSD Foundation (cherry picked from commit 630f633f2a7618e7726ceb6ff4bff1c442919250) --- sys/kern/kern_umtx.c | 2 +- sys/vm/vm_object.c | 7 ++++--- sys/vm/vm_object.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index f847bd771a84..513b084ea489 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -4332,7 +4332,7 @@ umtx_shm_unref_reg(struct umtx_shm_reg *reg, bool force) if (force) { object = reg->ushm_obj->shm_object; VM_OBJECT_WLOCK(object); - object->flags |= OBJ_UMTXDEAD; + vm_object_set_flag(object, OBJ_UMTXDEAD); VM_OBJECT_WUNLOCK(object); } mtx_lock(&umtx_shm_lock); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 94f9bed3d9b8..efd646cf52e0 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -744,7 +744,7 @@ vm_object_backing_remove_locked(vm_object_t object) vm_object_sub_shadow(backing_object); if ((object->flags & OBJ_SHADOWLIST) != 0) { LIST_REMOVE(object, shadow_list); - object->flags &= ~OBJ_SHADOWLIST; + vm_object_clear_flag(object, OBJ_SHADOWLIST); } object->backing_object = NULL; } @@ -778,7 +778,7 @@ vm_object_backing_insert_locked(vm_object_t object, vm_object_t backing_object) VM_OBJECT_ASSERT_WLOCKED(backing_object); LIST_INSERT_HEAD(&backing_object->shadow_head, object, shadow_list); - object->flags |= OBJ_SHADOWLIST; + vm_object_set_flag(object, OBJ_SHADOWLIST); } object->backing_object = backing_object; } @@ -1498,7 +1498,8 @@ vm_object_shadow(vm_object_t *object, vm_ooffset_t *offset, vm_size_t length, vm_object_backing_insert(result, source); result->domain = source->domain; #if VM_NRESERVLEVEL > 0 - result->flags |= source->flags & OBJ_COLORED; + vm_object_set_flag(result, + (source->flags & OBJ_COLORED)); result->pg_color = (source->pg_color + OFF_TO_IDX(*offset)) & ((1 << (VM_NFREEORDER - 1)) - 1); diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 903c85261254..4a3c27514eb6 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -317,7 +317,7 @@ vm_object_color(vm_object_t object, u_short color) if ((object->flags & OBJ_COLORED) == 0) { object->pg_color = color; - object->flags |= OBJ_COLORED; + vm_object_set_flag(object, OBJ_COLORED); } }