]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/debugfs/inode.c
[PATCH] VFS: Permit filesystem to override root dentry on mount
[mirror_ubuntu-zesty-kernel.git] / fs / debugfs / inode.c
index 85d166cdcae4908e8916b4e66a1dd30722b00f1c..440128ebef3b04ed4a90c0d247475f1a701b4c2c 100644 (file)
@@ -67,12 +67,13 @@ static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t d
 static int debugfs_mknod(struct inode *dir, struct dentry *dentry,
                         int mode, dev_t dev)
 {
-       struct inode *inode = debugfs_get_inode(dir->i_sb, mode, dev);
+       struct inode *inode;
        int error = -EPERM;
 
        if (dentry->d_inode)
                return -EEXIST;
 
+       inode = debugfs_get_inode(dir->i_sb, mode, dev);
        if (inode) {
                d_instantiate(dentry, inode);
                dget(dentry);
@@ -110,11 +111,11 @@ static int debug_fill_super(struct super_block *sb, void *data, int silent)
        return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files);
 }
 
-static struct super_block *debug_get_sb(struct file_system_type *fs_type,
-                                       int flags, const char *dev_name,
-                                       void *data)
+static int debug_get_sb(struct file_system_type *fs_type,
+                       int flags, const char *dev_name,
+                       void *data, struct vfsmount *mnt)
 {
-       return get_sb_single(fs_type, flags, data, debug_fill_super);
+       return get_sb_single(fs_type, flags, data, debug_fill_super, mnt);
 }
 
 static struct file_system_type debug_fs_type = {