[PATCH v4 23/59] move_mount(): filename_lookup() accepts ERR_PTR() as filename

Al Viro
2026-01-08T07:36:54Z

no need to check it in the caller

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
fs/namespace.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index c58674a20cad..9d0d8ed16264 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -4427,9 +4427,6 @@ SYSCALL_DEFINE5(move_mount,
uflags = AT_EMPTY_PATH;

to_name = getname_maybe_null(to_pathname, uflags);
- if (IS_ERR(to_name))
- return PTR_ERR(to_name);
-
if (!to_name && to_dfd >= 0) {
CLASS(fd_raw, f_to)(to_dfd);
if (fd_empty(f_to))
@@ -4453,9 +4450,6 @@ SYSCALL_DEFINE5(move_mount,
uflags = AT_EMPTY_PATH;

from_name = getname_maybe_null(from_pathname, uflags);
- if (IS_ERR(from_name))
- return PTR_ERR(from_name);
-
if (!from_name && from_dfd >= 0) {
CLASS(fd_raw, f_from)(from_dfd);
if (fd_empty(f_from))
--
2.47.3