diff options
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r-- | fs/sysfs/mount.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index ab343e371d64..49749955ccaf 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c | |||
@@ -17,11 +17,10 @@ | |||
17 | #include <linux/pagemap.h> | 17 | #include <linux/pagemap.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/magic.h> | ||
20 | 21 | ||
21 | #include "sysfs.h" | 22 | #include "sysfs.h" |
22 | 23 | ||
23 | /* Random magic number */ | ||
24 | #define SYSFS_MAGIC 0x62656572 | ||
25 | 24 | ||
26 | static struct vfsmount *sysfs_mount; | 25 | static struct vfsmount *sysfs_mount; |
27 | struct super_block * sysfs_sb = NULL; | 26 | struct super_block * sysfs_sb = NULL; |
@@ -30,6 +29,7 @@ struct kmem_cache *sysfs_dir_cachep; | |||
30 | static const struct super_operations sysfs_ops = { | 29 | static const struct super_operations sysfs_ops = { |
31 | .statfs = simple_statfs, | 30 | .statfs = simple_statfs, |
32 | .drop_inode = generic_delete_inode, | 31 | .drop_inode = generic_delete_inode, |
32 | .delete_inode = sysfs_delete_inode, | ||
33 | }; | 33 | }; |
34 | 34 | ||
35 | struct sysfs_dirent sysfs_root = { | 35 | struct sysfs_dirent sysfs_root = { |
@@ -53,7 +53,9 @@ static int sysfs_fill_super(struct super_block *sb, void *data, int silent) | |||
53 | sysfs_sb = sb; | 53 | sysfs_sb = sb; |
54 | 54 | ||
55 | /* get root inode, initialize and unlock it */ | 55 | /* get root inode, initialize and unlock it */ |
56 | mutex_lock(&sysfs_mutex); | ||
56 | inode = sysfs_get_inode(&sysfs_root); | 57 | inode = sysfs_get_inode(&sysfs_root); |
58 | mutex_unlock(&sysfs_mutex); | ||
57 | if (!inode) { | 59 | if (!inode) { |
58 | pr_debug("sysfs: could not get root inode\n"); | 60 | pr_debug("sysfs: could not get root inode\n"); |
59 | return -ENOMEM; | 61 | return -ENOMEM; |