rt2x00: Fix beaconing on rt2800.
[safe/jmp/linux-2.6] / fs / sysfs / mount.c
index 8133ca3..4974995 100644 (file)
@@ -29,6 +29,7 @@ struct kmem_cache *sysfs_dir_cachep;
 static const struct super_operations sysfs_ops = {
        .statfs         = simple_statfs,
        .drop_inode     = generic_delete_inode,
+       .delete_inode   = sysfs_delete_inode,
 };
 
 struct sysfs_dirent sysfs_root = {
@@ -52,7 +53,9 @@ static int sysfs_fill_super(struct super_block *sb, void *data, int silent)
        sysfs_sb = sb;
 
        /* get root inode, initialize and unlock it */
+       mutex_lock(&sysfs_mutex);
        inode = sysfs_get_inode(&sysfs_root);
+       mutex_unlock(&sysfs_mutex);
        if (!inode) {
                pr_debug("sysfs: could not get root inode\n");
                return -ENOMEM;