From: Al Viro Date: Fri, 31 Oct 2025 05:02:50 +0000 (-0400) Subject: file_getattr(): filename_lookup() accepts ERR_PTR() as filename X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58a49cc9ebb13efd1c56c3466b09240779ac46a2;p=thirdparty%2Fkernel%2Flinux.git file_getattr(): filename_lookup() accepts ERR_PTR() as filename no need to check it in the caller Signed-off-by: Al Viro --- diff --git a/fs/file_attr.c b/fs/file_attr.c index 13cdb31a3e947..ddd4939af7b6e 100644 --- a/fs/file_attr.c +++ b/fs/file_attr.c @@ -396,9 +396,6 @@ SYSCALL_DEFINE5(file_getattr, int, dfd, const char __user *, filename, return -EINVAL; name = getname_maybe_null(filename, at_flags); - if (IS_ERR(name)) - return PTR_ERR(name); - if (!name && dfd >= 0) { CLASS(fd, f)(dfd); if (fd_empty(f))