Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C07FC7619A for ; Thu, 6 Apr 2023 03:03:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235107AbjDFDDt (ORCPT ); Wed, 5 Apr 2023 23:03:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234888AbjDFDDh (ORCPT ); Wed, 5 Apr 2023 23:03:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB8665BA9 for ; Wed, 5 Apr 2023 20:03:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7C29C64218 for ; Thu, 6 Apr 2023 03:03:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D34E0C433D2; Thu, 6 Apr 2023 03:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1680750213; bh=kSHQxTk5gAJgCMoQpS+uIMvapsIdVbLgDCOrn8PYbz0=; h=Date:To:From:Subject:From; b=YlL8DhUkWLHPTpWxm1r5nfTT4P+DzHX02WIlIgg2QmIIvq1dGASRtY7T6pUwD0zP8 FotUoZHe0D3UVzy9z7jFmnOP9wgnQNW/N5pZxssIuDLRrywoJahDpvBDBD1b6GC5N4 x7Q1wS2yi+Wox1XJA19ViAMsF96qMAp0LsJKHDek= Date: Wed, 05 Apr 2023 20:03:33 -0700 To: mm-commits@vger.kernel.org, surenb@google.com, akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] mm-move-mmap_lock-assert-function-definitions.patch removed from -mm tree Message-Id: <20230406030333.D34E0C433D2@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The quilt patch titled Subject: mm: move mmap_lock assert function definitions has been removed from the -mm tree. Its filename was mm-move-mmap_lock-assert-function-definitions.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Suren Baghdasaryan Subject: mm: move mmap_lock assert function definitions Date: Mon, 27 Feb 2023 09:36:10 -0800 Move mmap_lock assert function definitions up so that they can be used by other mmap_lock routines. Link: https://lkml.kernel.org/r/20230227173632.3292573-12-surenb@google.com Signed-off-by: Suren Baghdasaryan Signed-off-by: Andrew Morton --- include/linux/mmap_lock.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) --- a/include/linux/mmap_lock.h~mm-move-mmap_lock-assert-function-definitions +++ a/include/linux/mmap_lock.h @@ -60,6 +60,18 @@ static inline void __mmap_lock_trace_rel #endif /* CONFIG_TRACING */ +static inline void mmap_assert_locked(struct mm_struct *mm) +{ + lockdep_assert_held(&mm->mmap_lock); + VM_BUG_ON_MM(!rwsem_is_locked(&mm->mmap_lock), mm); +} + +static inline void mmap_assert_write_locked(struct mm_struct *mm) +{ + lockdep_assert_held_write(&mm->mmap_lock); + VM_BUG_ON_MM(!rwsem_is_locked(&mm->mmap_lock), mm); +} + static inline void mmap_init_lock(struct mm_struct *mm) { init_rwsem(&mm->mmap_lock); @@ -150,18 +162,6 @@ static inline void mmap_read_unlock_non_ up_read_non_owner(&mm->mmap_lock); } -static inline void mmap_assert_locked(struct mm_struct *mm) -{ - lockdep_assert_held(&mm->mmap_lock); - VM_BUG_ON_MM(!rwsem_is_locked(&mm->mmap_lock), mm); -} - -static inline void mmap_assert_write_locked(struct mm_struct *mm) -{ - lockdep_assert_held_write(&mm->mmap_lock); - VM_BUG_ON_MM(!rwsem_is_locked(&mm->mmap_lock), mm); -} - static inline int mmap_lock_is_contended(struct mm_struct *mm) { return rwsem_is_contended(&mm->mmap_lock); _ Patches currently in -mm which might be from surenb@google.com are