summaryrefslogtreecommitdiff
path: root/fs/filesystems.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2003-04-29 17:17:42 -0700
committerChristoph Hellwig <hch@lst.de>2003-04-29 17:17:42 -0700
commitfbf7eda6f4f1e3d5b9a26d82a6884755d34923b7 (patch)
tree288b6fc4de89a142f68c249dbdd286042916034a /fs/filesystems.c
parent67ac5b866bda838d9838faedad0435e3e84fb2bd (diff)
[PATCH] __module_get
Introduces __module_get for places where we know we already hold a reference and ignoring the fact that the module is being "rmmod --wait"ed is simpler.
Diffstat (limited to 'fs/filesystems.c')
-rw-r--r--fs/filesystems.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/filesystems.c b/fs/filesystems.c
index a87d637e168a..c4b467fb67dd 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -32,17 +32,7 @@ static rwlock_t file_systems_lock = RW_LOCK_UNLOCKED;
/* WARNING: This can be used only if we _already_ own a reference */
void get_filesystem(struct file_system_type *fs)
{
- if (!try_module_get(fs->owner)) {
-#ifdef CONFIG_MODULE_UNLOAD
- unsigned int cpu = get_cpu();
- local_inc(&fs->owner->ref[cpu].count);
- put_cpu();
-#else
- /* Getting filesystem while it's starting up? We're
- already supposed to have a reference. */
- BUG();
-#endif
- }
+ __module_get(fs->owner);
}
void put_filesystem(struct file_system_type *fs)