diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-28 23:34:14 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-28 23:34:14 +0100 |
commit | 38a6ed3ed8e108b662f4016a1ebf068dcf4c1ef4 (patch) | |
tree | a83d5e4e86edf6cb2de22db6f2ff2274753a2bab /fs/sysfs/mount.c | |
parent | f2d28a2ebcb525a6ec7e2152106ddb385ef52b73 (diff) | |
parent | 7c730ccdc1188b97f5c8cb690906242c7ed75c22 (diff) |
Merge branch 'linus' into core/printk
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 ab343e371d6..49749955cca 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -17,11 +17,10 @@ #include <linux/pagemap.h> #include <linux/init.h> #include <linux/module.h> +#include <linux/magic.h> #include "sysfs.h" -/* Random magic number */ -#define SYSFS_MAGIC 0x62656572 static struct vfsmount *sysfs_mount; struct super_block * sysfs_sb = NULL; @@ -30,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 = { @@ -53,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; |