summaryrefslogtreecommitdiffstats
path: root/fs/internal.h
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2023-09-08 16:28:59 +0300
committerChristian Brauner <brauner@kernel.org>2023-09-11 15:05:50 +0200
commit3e15dcf77b23b8e9b9b7f3c0d4def8fe9c12c534 (patch)
treeebda084e8926351870f6f0349a2e958705e84d0d /fs/internal.h
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff)
downloadlinux-3e15dcf77b23b8e9b9b7f3c0d4def8fe9c12c534.tar.gz
linux-3e15dcf77b23b8e9b9b7f3c0d4def8fe9c12c534.tar.bz2
linux-3e15dcf77b23b8e9b9b7f3c0d4def8fe9c12c534.zip
fs: rename __mnt_{want,drop}_write*() helpers
Before exporting these helpers to modules, make their names more meaningful. The names mnt_{get,put)_write_access*() were chosen, because they rhyme with the inode {get,put)_write_access() helpers, which have a very close meaning for the inode object. Suggested-by: Christian Brauner <brauner@kernel.org> Link: https://lore.kernel.org/r/20230817-anfechtbar-ruhelosigkeit-8c6cca8443fc@brauner/ Signed-off-by: Amir Goldstein <amir73il@gmail.com> Message-Id: <20230908132900.2983519-2-amir73il@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/internal.h')
-rw-r--r--fs/internal.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/internal.h b/fs/internal.h
index d64ae03998cc..8260c738980c 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -73,8 +73,8 @@ extern int sb_prepare_remount_readonly(struct super_block *);
extern void __init mnt_init(void);
-extern int __mnt_want_write_file(struct file *);
-extern void __mnt_drop_write_file(struct file *);
+int mnt_get_write_access_file(struct file *file);
+void mnt_put_write_access_file(struct file *file);
extern void dissolve_on_fput(struct vfsmount *);
extern bool may_mount(void);
@@ -101,7 +101,7 @@ static inline void put_file_access(struct file *file)
i_readcount_dec(file->f_inode);
} else if (file->f_mode & FMODE_WRITER) {
put_write_access(file->f_inode);
- __mnt_drop_write(file->f_path.mnt);
+ mnt_put_write_access(file->f_path.mnt);
}
}
@@ -130,9 +130,9 @@ static inline void sb_start_ro_state_change(struct super_block *sb)
* mnt_is_readonly() making sure if mnt_is_readonly() sees SB_RDONLY
* cleared, it will see s_readonly_remount set.
* For RW->RO transition, the barrier pairs with the barrier in
- * __mnt_want_write() before the mnt_is_readonly() check. The barrier
- * makes sure if __mnt_want_write() sees MNT_WRITE_HOLD already
- * cleared, it will see s_readonly_remount set.
+ * mnt_get_write_access() before the mnt_is_readonly() check.
+ * The barrier makes sure if mnt_get_write_access() sees MNT_WRITE_HOLD
+ * already cleared, it will see s_readonly_remount set.
*/
smp_wmb();
}