Unverified Commit 4a1ddb0f authored by Christian Brauner's avatar Christian Brauner
Browse files

pidfs: avoid misleading break



The break would only break out of the scoped_guard() loop, not the
switch statement. It still works correct as is ofc but let's avoid the
confusion.

Reported-by: default avatarDavid Lechner <dlechner@baylibre.com>
Link:: https://lore.kernel.org/cd2153f1-098b-463c-bbc1-5c6ca9ef1f12@baylibre.com


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent fdcfce93
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -577,8 +577,7 @@ static long pidfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
			struct user_namespace *user_ns;

			user_ns = task_cred_xxx(task, user_ns);
			if (!ns_ref_get(user_ns))
				break;
			if (ns_ref_get(user_ns))
				ns_common = to_ns_common(user_ns);
		}
#endif
@@ -589,8 +588,7 @@ static long pidfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
			struct pid_namespace *pid_ns;

			pid_ns = task_active_pid_ns(task);
			if (!ns_ref_get(pid_ns))
				break;
			if (ns_ref_get(pid_ns))
				ns_common = to_ns_common(pid_ns);
		}
#endif