Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0834a833 authored by Al Viro's avatar Al Viro Committed by Amit Pundir
Browse files

UPSTREAM: fold debugfs_link() into caller



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>

Bug: 31856701
Change-Id: I1a38bad19a90d2ff08d70721cd9c5b71d0ba5fbc
(cherry picked from commit 9b73fab01bcd62530e8c9a5da44d3ed8a753b3eb)
Signed-off-by: default avatarPaul Lawrence <paullawrence@google.com>
parent d85b72b0
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -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)
{
@@ -475,7 +467,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);