]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/sysfs/mount.c
ahci, pata_marvell: play nicely together
[linux-2.6-omap-h63xx.git] / fs / sysfs / mount.c
index 28bf359981fc678341af7e867d44dacfa2956647..14f0023984d74d6a51dedc0791fdfab53f2d5cc4 100644 (file)
@@ -1,5 +1,13 @@
 /*
- * mount.c - operations for initializing and mounting sysfs.
+ * fs/sysfs/symlink.c - operations for initializing and mounting sysfs
+ *
+ * Copyright (c) 2001-3 Patrick Mochel
+ * Copyright (c) 2007 SUSE Linux Products GmbH
+ * Copyright (c) 2007 Tejun Heo <teheo@suse.de>
+ *
+ * This file is released under the GPLv2.
+ *
+ * Please see Documentation/filesystems/sysfs.txt for more information.
  */
 
 #define DEBUG 
@@ -24,8 +32,9 @@ static const struct super_operations sysfs_ops = {
 };
 
 struct sysfs_dirent sysfs_root = {
+       .s_name         = "",
        .s_count        = ATOMIC_INIT(1),
-       .s_flags        = SYSFS_ROOT,
+       .s_flags        = SYSFS_DIR,
        .s_mode         = S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO,
        .s_ino          = 1,
 };
@@ -52,7 +61,7 @@ static int sysfs_fill_super(struct super_block *sb, void *data, int silent)
        /* instantiate and link root dentry */
        root = d_alloc_root(inode);
        if (!root) {
-               pr_debug("%s: could not get root dentry!\n",__FUNCTION__);
+               pr_debug("%s: could not get root dentry!\n",__func__);
                iput(inode);
                return -ENOMEM;
        }
@@ -83,6 +92,10 @@ int __init sysfs_init(void)
        if (!sysfs_dir_cachep)
                goto out;
 
+       err = sysfs_inode_init();
+       if (err)
+               goto out_err;
+
        err = register_filesystem(&sysfs_fs_type);
        if (!err) {
                sysfs_mount = kern_mount(&sysfs_fs_type);