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

Commit 9b5d7c5b authored by Al Viro's avatar Al Viro Committed by Amit Pundir
Browse files

UPSTREAM: fold debugfs_create() into caller



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

Bug: 31856701
(cherry picked from commit 3473cde5655cf4501cadb8ed11ab8aad1484b377)
Change-Id: I9c990c946e069354853f538d1be97606d10336b6
Signed-off-by: default avatarPaul Lawrence <paullawrence@google.com>
parent f0cb8f6a
Loading
Loading
Loading
Loading
+3 −14
Original line number Diff line number Diff line
@@ -84,19 +84,6 @@ static int debugfs_mknod(struct dentry *dentry,
	return 0;
}

static int debugfs_create(struct dentry *dentry, umode_t mode,
			  void *data, const struct file_operations *fops)
{
	struct inode *dir = dentry->d_parent->d_inode;
	int res;

	mode = (mode & S_IALLUGO) | S_IFREG;
	res = debugfs_mknod(dentry, mode, data, fops);
	if (!res)
		fsnotify_create(dir, dentry);
	return res;
}

static inline int debugfs_positive(struct dentry *dentry)
{
	return dentry->d_inode && !d_unhashed(dentry);
@@ -371,7 +358,9 @@ struct dentry *debugfs_create_file(const char *name, umode_t mode,
	if (IS_ERR(dentry))
		return NULL;

	error = debugfs_create(dentry, mode, data, fops);
	error = debugfs_mknod(dentry, mode, data, fops);
	if (!error)
		fsnotify_create(dentry->d_parent->d_inode, dentry);
	return end_creating(dentry, error);
}
EXPORT_SYMBOL_GPL(debugfs_create_file);