aboutsummaryrefslogtreecommitdiffstats
path: root/fs/filesystems.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/filesystems.c')
-rw-r--r--fs/filesystems.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/filesystems.c b/fs/filesystems.c
index cac75547d35c..a920ad2629ac 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -33,9 +33,10 @@ static struct file_system_type *file_systems;
33static DEFINE_RWLOCK(file_systems_lock); 33static DEFINE_RWLOCK(file_systems_lock);
34 34
35/* WARNING: This can be used only if we _already_ own a reference */ 35/* WARNING: This can be used only if we _already_ own a reference */
36void get_filesystem(struct file_system_type *fs) 36struct file_system_type *get_filesystem(struct file_system_type *fs)
37{ 37{
38 __module_get(fs->owner); 38 __module_get(fs->owner);
39 return fs;
39} 40}
40 41
41void put_filesystem(struct file_system_type *fs) 42void put_filesystem(struct file_system_type *fs)
@@ -275,8 +276,10 @@ struct file_system_type *get_fs_type(const char *name)
275 int len = dot ? dot - name : strlen(name); 276 int len = dot ? dot - name : strlen(name);
276 277
277 fs = __get_fs_type(name, len); 278 fs = __get_fs_type(name, len);
278 if (!fs && (request_module("fs-%.*s", len, name) == 0)) 279 if (!fs && (request_module("fs-%.*s", len, name) == 0)) {
279 fs = __get_fs_type(name, len); 280 fs = __get_fs_type(name, len);
281 WARN_ONCE(!fs, "request_module fs-%.*s succeeded, but still no fs?\n", len, name);
282 }
280 283
281 if (dot && fs && !(fs->fs_flags & FS_HAS_SUBTYPE)) { 284 if (dot && fs && !(fs->fs_flags & FS_HAS_SUBTYPE)) {
282 put_filesystem(fs); 285 put_filesystem(fs);