linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/memfd: Rename error labels for clarity
@ 2025-06-09  3:18 Ye Liu
  2025-06-10  0:26 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Ye Liu @ 2025-06-09  3:18 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, Ye Liu

From: Ye Liu <liuye@kylinos.cn>

err_name --> err_fd (fd failure case)
err_fd --> err_file (file failure case)

Signed-off-by: Ye Liu <liuye@kylinos.cn>
---
 mm/memfd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mm/memfd.c b/mm/memfd.c
index ab367e61553d..628bfa5fa9da 100644
--- a/mm/memfd.c
+++ b/mm/memfd.c
@@ -475,22 +475,22 @@ SYSCALL_DEFINE2(memfd_create,
 	fd = get_unused_fd_flags((flags & MFD_CLOEXEC) ? O_CLOEXEC : 0);
 	if (fd < 0) {
 		error = fd;
-		goto err_name;
+		goto err_fd;
 	}
 
 	file = alloc_file(name, flags);
 	if (IS_ERR(file)) {
 		error = PTR_ERR(file);
-		goto err_fd;
+		goto err_file;
 	}
 
 	fd_install(fd, file);
 	kfree(name);
 	return fd;
 
-err_fd:
+err_file:
 	put_unused_fd(fd);
-err_name:
+err_fd:
 	kfree(name);
 	return error;
 }
-- 
2.25.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-10  1:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-09  3:18 [PATCH] mm/memfd: Rename error labels for clarity Ye Liu
2025-06-10  0:26 ` Andrew Morton
2025-06-10  1:51   ` Ye Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox