X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Ffilesystems.c;h=e3fa77c6ed56dce64e3fe68892022edaa85d0e56;hb=refs%2Fheads%2Fvserver;hp=276be78d5f32995233fb9f011da0af8ef5ff361a;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/filesystems.c b/fs/filesystems.c index 276be78d5..e3fa77c6e 100644 --- a/fs/filesystems.c +++ b/fs/filesystems.c @@ -6,11 +6,13 @@ * table of configured filesystems */ +#include #include #include #include #include #include +#include /* for 'current' */ #include /* @@ -27,7 +29,7 @@ */ static struct file_system_type *file_systems; -static rwlock_t file_systems_lock = RW_LOCK_UNLOCKED; +static DEFINE_RWLOCK(file_systems_lock); /* WARNING: This can be used only if we _already_ own a reference */ void get_filesystem(struct file_system_type *fs) @@ -67,8 +69,6 @@ int register_filesystem(struct file_system_type * fs) int res = 0; struct file_system_type ** p; - if (!fs) - return -EINVAL; if (fs->next) return -EBUSY; INIT_LIST_HEAD(&fs->fs_supers);