From: Adrian Garcia Casado <adriangarciacasado42@gmail.com>
To: gfs2@lists.linux.dev
Cc: linux-kernel@vger.kernel.org, rpeterso@redhat.com, agruenba@redhat.com
Subject: [PATCH] gfs2: add missing __rcu annotation to i_gl in incore.h
Date: Tue, 30 Jun 2026 11:55:00 +0200 [thread overview]
Message-ID: <6a439397.39c9bec7.125ac1.2db8@mx.google.com> (raw)
In gfs2_inode_lookup() and other parts of the GFS2 filesystem,
ip->i_gl is accessed and dereferenced via RCU helpers like
rcu_dereference_check() and rcu_access_pointer(). However, the
actual i_gl pointer in struct gfs2_inode was never annotated
with __rcu in incore.h.
This missing annotation causes Sparse to throw multiple
"incompatible types in comparison expression (different address spaces)"
warnings and compilation-blocking errors under strict static analysis builds.
Fix this by adding the __rcu annotation to i_gl in struct gfs2_inode.
Signed-off-by: Adrian Garcia Casado <adriangarciacasado42@gmail.com>
Tested-by: Adrian Garcia Casado <adriangarciacasado42@gmail.com>
---
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 6146577..16df753 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -392,7 +392,7 @@ struct gfs2_inode {
u64 i_generation;
u64 i_eattr;
unsigned long i_flags; /* GIF_... */
- struct gfs2_glock *i_gl;
+ struct gfs2_glock __rcu *i_gl;
struct gfs2_holder i_iopen_gh;
struct gfs2_qadata *i_qadata; /* quota allocation data */
struct gfs2_holder i_rgd_gh;
next reply other threads:[~2026-06-30 9:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 9:55 Adrian Garcia Casado [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-06-30 10:02 [PATCH] gfs2: add missing __rcu annotation to i_gl in incore.h Adrian Garcia Casado
2026-06-18 13:56 Adrian
2026-06-18 13:56 Adrian
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=6a439397.39c9bec7.125ac1.2db8@mx.google.com \
--to=adriangarciacasado42@gmail.com \
--cc=agruenba@redhat.com \
--cc=gfs2@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=rpeterso@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.