linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	 "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	 Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	 Vlastimil Babka <vbabka@suse.cz>,
	Shakeel Butt <shakeel.butt@linux.dev>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: [PATCH] mm: forward declare struct rcuwait together with rcuwait_wake_up()
Date: Tue, 16 Sep 2025 15:59:08 +0200	[thread overview]
Message-ID: <20250916-mm-rcuwait-v1-1-39a3beea6ec3@linutronix.de> (raw)

At the point of the forward declaration of rcuwait_wake_up()
in mmap_lock.h 'struct rcuwait' may have not yet been declared,
leading to compiler errors.

Add an explicit forward declaration for the struct.

Fixes: 75404e07663b ("mm: move mmap/vma locking logic into specific files")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
This doesn't seem to break any in-tree code right now.
I stumbled upon it while building a series for the next cycle.
Instead of putting this fix into my series and spamming all the mm
maintainers with it, maybe this could be part of the last mm bugfix pull
for this cycle.
---
 include/linux/mmap_lock.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/mmap_lock.h b/include/linux/mmap_lock.h
index 11a078de9150df1beff4f0bfb16e199333767614..9792dd4fff0ff73829833aae8ea3229a31757d61 100644
--- a/include/linux/mmap_lock.h
+++ b/include/linux/mmap_lock.h
@@ -3,6 +3,7 @@
 #define _LINUX_MMAP_LOCK_H
 
 /* Avoid a dependency loop by declaring here. */
+struct rcuwait;
 extern int rcuwait_wake_up(struct rcuwait *w);
 
 #include <linux/lockdep.h>

---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250916-mm-rcuwait-03c5fe95f36d

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh@linutronix.de>



             reply	other threads:[~2025-09-16 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16 13:59 Thomas Weißschuh [this message]
2025-09-16 22:04 ` Suren Baghdasaryan
2025-09-17  6:12   ` Thomas Weißschuh
2025-09-17 16:32     ` Suren Baghdasaryan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250916-mm-rcuwait-v1-1-39a3beea6ec3@linutronix.de \
    --to=thomas.weissschuh@linutronix.de \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox