Unverified Commit 00de6e24 authored by Christian Brauner's avatar Christian Brauner
Browse files
parent 7129098f
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -108,7 +108,6 @@ int ns_get_path(struct path *path, struct task_struct *task,
int open_namespace(struct ns_common *ns)
{
	struct path path __free(path_put) = {};
	struct file *f;
	int err;

	/* call first to consume reference */
@@ -116,16 +115,7 @@ int open_namespace(struct ns_common *ns)
	if (err < 0)
		return err;

	CLASS(get_unused_fd, fd)(O_CLOEXEC);
	if (fd < 0)
		return fd;

	f = dentry_open(&path, O_RDONLY, current_cred());
	if (IS_ERR(f))
		return PTR_ERR(f);

	fd_install(fd, f);
	return take_fd(fd);
	return FD_ADD(O_CLOEXEC, dentry_open(&path, O_RDONLY, current_cred()));
}

int open_related_ns(struct ns_common *ns,