mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrey Albershteyn <aalbersh@kernel.org>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: ebiggers@kernel.org, hch@lst.de,
	Andrey Albershteyn <aalbersh@kernel.org>
Subject: [PATCH] fs: constify inode argument of inode_state_read_once()
Date: Wed, 11 Nov 2026 11:01:49 +0100	[thread overview]
Message-ID: <20261111100148.3665035-2-aalbersh@kernel.org> (raw)

Constify inode parameter so that callers can pass const inode. Callers
do not need a change.

Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
---

Notes:
    I will have a user with const inode in fsverity
    https://lore.kernel.org/fsverity/20261105115532.613467-3-aalbersh@kernel.org/

 include/linux/fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 99caef43ff3c..c5ba625c8ae1 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -877,7 +877,7 @@ struct inode {
  *
  * We hide all of it behind helpers so that we can validate consumers.
  */
-static inline enum inode_state_flags_enum inode_state_read_once(struct inode *inode)
+static inline enum inode_state_flags_enum inode_state_read_once(const struct inode *inode)
 {
 	return READ_ONCE(inode->i_state.__state);
 }
-- 
2.54.0


                 reply	other threads:[~2026-11-11 10:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261111100148.3665035-2-aalbersh@kernel.org \
    --to=aalbersh@kernel.org \
    --cc=brauner@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®