]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
constify {__,}mnt_is_readonly()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 30 Aug 2025 06:48:13 +0000 (02:48 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 17 Sep 2025 19:58:29 +0000 (15:58 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namespace.c
include/linux/mount.h

index 54066c9b8da02f0084fc29ca8797f0373966125d..4b74fabced434d20c5bc418c51a4dd700b94f605 100644 (file)
@@ -428,7 +428,7 @@ out_free_cache:
  * mnt_want/drop_write() will _keep_ the filesystem
  * r/w.
  */
-bool __mnt_is_readonly(struct vfsmount *mnt)
+bool __mnt_is_readonly(const struct vfsmount *mnt)
 {
        return (mnt->mnt_flags & MNT_READONLY) || sb_rdonly(mnt->mnt_sb);
 }
@@ -468,7 +468,7 @@ static unsigned int mnt_get_writers(struct mount *mnt)
 #endif
 }
 
-static int mnt_is_readonly(struct vfsmount *mnt)
+static int mnt_is_readonly(const struct vfsmount *mnt)
 {
        if (READ_ONCE(mnt->mnt_sb->s_readonly_remount))
                return 1;
index 85e97b9340ff5ba29763200281d451fc8dd9071d..acfe7ef86a1b3fdd70ab460e6e731d3c532b6487 100644 (file)
@@ -76,7 +76,7 @@ extern void mntput(struct vfsmount *mnt);
 extern struct vfsmount *mntget(struct vfsmount *mnt);
 extern void mnt_make_shortterm(struct vfsmount *mnt);
 extern struct vfsmount *mnt_clone_internal(const struct path *path);
-extern bool __mnt_is_readonly(struct vfsmount *mnt);
+extern bool __mnt_is_readonly(const struct vfsmount *mnt);
 extern bool mnt_may_suid(struct vfsmount *mnt);
 
 extern struct vfsmount *clone_private_mount(const struct path *path);