This patch makes __mnt_is_readonly return bool due to this particular
function only using either one or zero as its return value.

No functional change.

Signed-off-by: rongyin <rong...@cmss.chinamobile.com>
---
 fs/namespace.c        | 8 ++++----
 include/linux/mount.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index e158ec6..8a0e90a 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -271,13 +271,13 @@ static struct mount *alloc_vfsmnt(const char *name)
  * mnt_want/drop_write() will _keep_ the filesystem
  * r/w.
  */
-int __mnt_is_readonly(struct vfsmount *mnt)
+bool __mnt_is_readonly(struct vfsmount *mnt)
 {
        if (mnt->mnt_flags & MNT_READONLY)
-               return 1;
+               return true;
        if (sb_rdonly(mnt->mnt_sb))
-               return 1;
-       return 0;
+               return true;
+       return false;
 }
 EXPORT_SYMBOL_GPL(__mnt_is_readonly);
 
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 45b1f56..037eed5 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -81,7 +81,7 @@ struct vfsmount {
 extern void mntput(struct vfsmount *mnt);
 extern struct vfsmount *mntget(struct vfsmount *mnt);
 extern struct vfsmount *mnt_clone_internal(const struct path *path);
-extern int __mnt_is_readonly(struct vfsmount *mnt);
+extern bool __mnt_is_readonly(struct vfsmount *mnt);
 extern bool mnt_may_suid(struct vfsmount *mnt);
 
 struct path;
-- 
1.8.3.1



Reply via email to