From nobody Thu Aug 17 19:58:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RRbRM1dMGz4q50Z; Thu, 17 Aug 2023 19:58:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RRbRL6z0Mz4HTt; Thu, 17 Aug 2023 19:58:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692302319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u8+eIGTOBZwxnDY8ibMftXe7eyaaGlOdoGiXa299Uyk=; b=LqRP19NQggStZFk3PHbFQhTo5YJq+HTUULQOODzSGWG/WNX4FFZVigDqfejXjHwGUunlDU q56NJNPZdfbUJEhVjWj6IFqqI57i7kAMs9EEO0z2beWhB0kIBn8cdW4B1AeWupHRZ7rF0W DMVIQFWYXKRtVMCXunpGdMrM+LoSUrMhrdFLlxeSZN3z24kmj7wGTdqqOtPip5vX8z7m9U 7uLd4NWACA+rTPLhEx6iGtl71GZ0MXH3OQhGDY5UuavytBsokZaGsTRAei39qXdXGLwT2x ewpSvusMoT3EQ6MkE1+0+9GTusbxCmwh1lStk2ekmRCTEgLXAylr8rKhst+MhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692302319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u8+eIGTOBZwxnDY8ibMftXe7eyaaGlOdoGiXa299Uyk=; b=jKkzIBkyrIwnaYZjEcWcCqoQIp28k6K/n2lIa1E8dqY4AN4qOUoRxxRprPzdQnOwYyXBLM YrIij+D9VzVMhdLTt55cd2bUYu7Z4EpBbp6UdXsXBKqpFQdrQJXEDf56Vub3mIVBRPUJ7i SbFPD9QohRnOdL6poAg9fe84sKvfdHmiE7oMkVG/yWtK8tqzGY8XohSVdekaBa37OF2sHN 6l/fFgCTJvsmCOWPYvnQ2/CkM0Xoa92Jhm/Qp/HZfTuLrCfRsFYQB4roJdiuIlqJgyJULs cHJVRgDk/+Lse+ALDmR0siP40EGzdx0DlAmxEFcIaXEkW0AYxRbnogruO/Ks6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692302319; a=rsa-sha256; cv=none; b=lWsVIA/PAjKxOLtZgxpAevt+Mp4RPPb/OoBCEpk5NqkKfdIDMg5rSeUwOrFKwO+jpYfoC0 PMk7bcILHl3luUb4GpuQlzBRGojnQBQZC+jbIBLZl99Wi/OcaNaH3fYE/nBAx78oSA/v/C sGCeOCyPACUXoY5RoBUrPIX0A7tEM6VZ7/F3YQOZXJs9OZla7MZOkArFMlIGjtg6VgFQu1 j1nK5/X353b7QJjPlXA832OtjSlxRR7e6jtJkwfZ8nMmlA+k9chs6r9j3ZuMwXJOaxrJZt pPgtKNxJkrni7J42RGfCv4UvbGaYzELONa+2w4jBKPpx4uHcXji17p/hNZ2BBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RRbRL62dqzmtv; Thu, 17 Aug 2023 19:58:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37HJwcAX080377; Thu, 17 Aug 2023 19:58:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37HJwc6e080374; Thu, 17 Aug 2023 19:58:38 GMT (envelope-from git) Date: Thu, 17 Aug 2023 19:58:38 GMT Message-Id: <202308171958.37HJwc6e080374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 7307c4396347 - main - linux(4): Use native off_t for fo_sendfile call List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7307c4396347af670dc86e2e7a9dfadb55e1c458 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=7307c4396347af670dc86e2e7a9dfadb55e1c458 commit 7307c4396347af670dc86e2e7a9dfadb55e1c458 Author: Dmitry Chagin AuthorDate: 2023-08-17 19:57:17 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-17 19:57:17 +0000 linux(4): Use native off_t for fo_sendfile call MFC after: 1 month --- sys/compat/linux/linux_socket.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 48db95d240cb..45b94cb2f994 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -2376,7 +2376,7 @@ out: static int linux_sendfile_common(struct thread *td, l_int out, l_int in, - l_loff_t *offset, l_size_t count) + off_t *offset, l_size_t count) { off_t bytes_read; int error; @@ -2447,8 +2447,8 @@ linux_sendfile(struct thread *td, struct linux_sendfile_args *arg) * returns 0. We use the 'bytes read' parameter to get this value. */ - l_loff_t offset64; - l_long offset; + off_t offset64; + l_off_t offset; int ret; int error; @@ -2456,7 +2456,7 @@ linux_sendfile(struct thread *td, struct linux_sendfile_args *arg) error = copyin(arg->offset, &offset, sizeof(offset)); if (error != 0) return (error); - offset64 = (l_loff_t)offset; + offset64 = offset; } ret = linux_sendfile_common(td, arg->out, arg->in, @@ -2468,7 +2468,7 @@ linux_sendfile(struct thread *td, struct linux_sendfile_args *arg) if (offset64 > INT32_MAX) return (EOVERFLOW); #endif - offset = (l_long)offset64; + offset = (l_off_t)offset64; error = copyout(&offset, arg->offset, sizeof(offset)); if (error != 0) return (error); @@ -2483,7 +2483,7 @@ linux_sendfile(struct thread *td, struct linux_sendfile_args *arg) int linux_sendfile64(struct thread *td, struct linux_sendfile64_args *arg) { - l_loff_t offset; + off_t offset; int ret; int error;