}
 
        /* attach dentry and inode */
-       inode = sysfs_get_inode(sd);
+       inode = sysfs_get_inode(dir->i_sb, sd);
        if (!inode) {
                ret = ERR_PTR(-ENOMEM);
                goto out_unlock;
 
 
 /**
  *     sysfs_get_inode - get inode for sysfs_dirent
+ *     @sb: super block
  *     @sd: sysfs_dirent to allocate inode for
  *
  *     Get inode for @sd.  If such inode doesn't exist, a new inode
  *     RETURNS:
  *     Pointer to allocated inode on success, NULL on failure.
  */
-struct inode * sysfs_get_inode(struct sysfs_dirent *sd)
+struct inode * sysfs_get_inode(struct super_block *sb, struct sysfs_dirent *sd)
 {
        struct inode *inode;
 
-       inode = iget_locked(sysfs_sb, sd->s_ino);
+       inode = iget_locked(sb, sd->s_ino);
        if (inode && (inode->i_state & I_NEW))
                sysfs_init_inode(sd, inode);
 
 
 
        /* get root inode, initialize and unlock it */
        mutex_lock(&sysfs_mutex);
-       inode = sysfs_get_inode(&sysfs_root);
+       inode = sysfs_get_inode(sb, &sysfs_root);
        mutex_unlock(&sysfs_mutex);
        if (!inode) {
                pr_debug("sysfs: could not get root inode\n");
 
 /*
  * inode.c
  */
-struct inode *sysfs_get_inode(struct sysfs_dirent *sd);
+struct inode *sysfs_get_inode(struct super_block *sb, struct sysfs_dirent *sd);
 void sysfs_delete_inode(struct inode *inode);
 int sysfs_sd_setattr(struct sysfs_dirent *sd, struct iattr *iattr);
 int sysfs_permission(struct inode *inode, int mask);