fold debugfs_link() into caller
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 25 Jan 2015 19:05:55 +0000 (14:05 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 25 Jan 2015 21:52:50 +0000 (16:52 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/debugfs/inode.c

index 18564b08884c1f7c1fd73ceac89259baf9031a86..c69e00d69ff10100e1f61e8100f7fd53c1e224d7 100644 (file)
@@ -103,14 +103,6 @@ static int debugfs_mkdir(struct dentry *dentry, umode_t mode)
        return res;
 }
 
-static int debugfs_link(struct dentry *dentry, umode_t mode,
-                       void *data)
-{
-       struct inode *dir = dentry->d_parent->d_inode;
-       mode = (mode & S_IALLUGO) | S_IFLNK;
-       return debugfs_mknod(dir, dentry, mode, 0, data, NULL);
-}
-
 static int debugfs_create(struct dentry *dentry, umode_t mode,
                          void *data, const struct file_operations *fops)
 {
@@ -466,7 +458,8 @@ struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent,
                return NULL;
        }
 
-       error = debugfs_link(dentry, S_IFLNK | S_IRWXUGO, link);
+       error = debugfs_mknod(dentry->d_parent->d_inode, dentry,
+                             S_IFLNK | S_IRWXUGO, 0, link, NULL);
        if (error)
                kfree(link);