summaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/fs/super.c b/fs/super.c
index e1fd667454d4..59aa59279133 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1645,16 +1645,22 @@ EXPORT_SYMBOL(__sb_end_write);
* This is an internal function, please use sb_start_{write,pagefault,intwrite}
* instead.
*/
-int __sb_start_write(struct super_block *sb, int level, bool wait)
+void __sb_start_write(struct super_block *sb, int level)
{
- if (!wait)
- return percpu_down_read_trylock(sb->s_writers.rw_sem + level-1);
-
- percpu_down_read(sb->s_writers.rw_sem + level-1);
- return 1;
+ percpu_down_read(sb->s_writers.rw_sem + level - 1);
}
EXPORT_SYMBOL(__sb_start_write);
+/*
+ * This is an internal function, please use sb_start_{write,pagefault,intwrite}
+ * instead.
+ */
+bool __sb_start_write_trylock(struct super_block *sb, int level)
+{
+ return percpu_down_read_trylock(sb->s_writers.rw_sem + level - 1);
+}
+EXPORT_SYMBOL_GPL(__sb_start_write_trylock);
+
/**
* sb_wait_write - wait until all writers to given file system finish
* @sb: the super for which we wait