Skip to content

Commit a797652

Browse files
author
Al Viro
committed
constify {__,}mnt_is_readonly()
Signed-off-by: Al Viro <[email protected]>
1 parent 1e414ad commit a797652

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fs/namespace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ static struct mount *alloc_vfsmnt(const char *name)
428428
* mnt_want/drop_write() will _keep_ the filesystem
429429
* r/w.
430430
*/
431-
bool __mnt_is_readonly(struct vfsmount *mnt)
431+
bool __mnt_is_readonly(const struct vfsmount *mnt)
432432
{
433433
return (mnt->mnt_flags & MNT_READONLY) || sb_rdonly(mnt->mnt_sb);
434434
}
@@ -468,7 +468,7 @@ static unsigned int mnt_get_writers(struct mount *mnt)
468468
#endif
469469
}
470470

471-
static int mnt_is_readonly(struct vfsmount *mnt)
471+
static int mnt_is_readonly(const struct vfsmount *mnt)
472472
{
473473
if (READ_ONCE(mnt->mnt_sb->s_readonly_remount))
474474
return 1;

include/linux/mount.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ extern void mntput(struct vfsmount *mnt);
7676
extern struct vfsmount *mntget(struct vfsmount *mnt);
7777
extern void mnt_make_shortterm(struct vfsmount *mnt);
7878
extern struct vfsmount *mnt_clone_internal(const struct path *path);
79-
extern bool __mnt_is_readonly(struct vfsmount *mnt);
79+
extern bool __mnt_is_readonly(const struct vfsmount *mnt);
8080
extern bool mnt_may_suid(struct vfsmount *mnt);
8181

8282
extern struct vfsmount *clone_private_mount(const struct path *path);

0 commit comments

Comments
 (0)