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

Commit a7498968 authored by Al Viro's avatar Al Viro
Browse files

oprofilefs: don't oops on allocation failure



... just short-circuit the creation of potential children

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 5bf1ddf7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -138,6 +138,9 @@ static int __oprofilefs_create_file(struct dentry *root, char const *name,
	struct dentry *dentry;
	struct inode *inode;

	if (!root)
		return -ENOMEM;

	inode_lock(d_inode(root));
	dentry = d_alloc_name(root, name);
	if (!dentry) {