From nobody Mon Aug 07 14:24:15 2023 X-Original-To: dev-commits-src-all@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 4RKJV75ZGdz4phSg; Mon, 7 Aug 2023 14:24:15 +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 4RKJV74JHRz4L83; Mon, 7 Aug 2023 14:24:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691418255; 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=3Wdifw/oemLPqCbM3xXkgBnhwQesPjJkEddKlLLR8hc=; b=ANLESaNIaFPfanFdH4GOgExj7bLefPzSO9lj4bAixBoeuyCWpUtTsxSpB/y8FZCkGOCXbf zVyl19laoVmQ4dBQaz1VYUjPlMRQoL6uQZR+SW28HKiisdDaqou+g4WvGEFmACcm7dBD9t r32xa9/ySSuVnJRvN+YrpaWoKeWYfXOEZabul0Bolfvqm86tVo6/LPToWhfYBJT+us+cHY m0HiCm4+5Wfkwa6HfBMq9JjalZPXhCbmTthJeyTfQrl8agjBxtJVKiToHvbAQnmmKBjI1Z 7gUFVDinxvP0kDq/XENVl68Jwr0TKhtZvBPuwqhNq7dCeYoIt2KAYDEP9Wup7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691418255; 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=3Wdifw/oemLPqCbM3xXkgBnhwQesPjJkEddKlLLR8hc=; b=Ntdkfi3QJK9lR+rpBgoHEtLYZk3iOqo7GxXmaiZSMVIhQY+cmwEmqT0szTH3bANrpF5mtd WzJKxNYNjkS+qY6An2TUb6pbbZLVaN9lqm8NDuyIvVMy/3bRej4RGyJbB1QMRUsiC9zJfG HbCSDjz1Sxbsta3AF2lYDfsSo0C8A2HW8TO7DZQX/FRO+cPZWSs8LDXkBftkwbA7oQZn6k ZcjkhGxZ6qUoxt6ohgscpapaecCyb/d4KIBnFD3HzbaHvCBd3kNFD39Wj4sWS+rwvGPoHv hI9xxAzUeg2ZVaxFhXmWOwh/WCV+sDhh/sGfIz99tWC0vaKj77TxeuhK/ygbjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691418255; a=rsa-sha256; cv=none; b=bSY94DV2dlJ7876J9TGpX9iTfIiiojPVyNiszkT8PUm6917dsqVQaEzp5NoTuPVY1GgTGi faYFs+T6jq15t8BiReB7ijxdVE/XNC2AMOb5imjaj0tOySnLQGdPALbBijQxrzi2jrevFV 5vQ/QdJA8CAduGQ0SVSITbFLfkjSXSGrKONQJJ4aBmL3eEVM5OZ+Cd8fXEQmddnPB/7T+Q w+WSDVaiIdKEUwPWyNWdGyY7pcZ87f17P945KodPSYJzcFZlvSZIiq1Pa35P+6Ee+X/qWH 3B7WRh3807hbo52O5MlCt6vEZZftYCBz0TskcovcKcYA17U0WXT6tnY1boBPRw== 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 4RKJV736pzzvGV; Mon, 7 Aug 2023 14:24:15 +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 377EOFrY025824; Mon, 7 Aug 2023 14:24:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 377EOFmW025823; Mon, 7 Aug 2023 14:24:15 GMT (envelope-from git) Date: Mon, 7 Aug 2023 14:24:15 GMT Message-Id: <202308071424.377EOFmW025823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 1821249a4d70 - stable/13 - linux(4): Delete a useless variable in readdir List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1821249a4d70fd8732f6f0eef42b3cbe0fe03f5f Auto-Submitted: auto-generated The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=1821249a4d70fd8732f6f0eef42b3cbe0fe03f5f commit 1821249a4d70fd8732f6f0eef42b3cbe0fe03f5f Author: Dmitry Chagin AuthorDate: 2023-07-18 21:44:15 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-07 14:22:58 +0000 linux(4): Delete a useless variable in readdir MFC after: 2 weeks (cherry picked from commit fffb2e8de691ba6677616f7e0e5c442f4e7e722a) --- sys/compat/linux/linux_file.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 0def70e70581..3e1b5299cf0b 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -598,9 +598,8 @@ linux_readdir(struct thread *td, struct linux_readdir_args *args) struct dirent *bdp; caddr_t buf; /* BSD-format */ int linuxreclen; /* Linux-format */ - caddr_t lbuf; /* Linux-format */ off_t base; - struct l_dirent *linux_dirent; + struct l_dirent *linux_dirent; /* Linux-format */ int buflen, error; buflen = sizeof(*bdp); @@ -615,12 +614,12 @@ linux_readdir(struct thread *td, struct linux_readdir_args *args) if (td->td_retval[0] == 0) goto out; - lbuf = malloc(LINUX_RECLEN(LINUX_NAME_MAX), M_TEMP, M_WAITOK | M_ZERO); + linux_dirent = malloc(LINUX_RECLEN(LINUX_NAME_MAX), M_TEMP, + M_WAITOK | M_ZERO); bdp = (struct dirent *) buf; linuxreclen = LINUX_RECLEN(bdp->d_namlen); - linux_dirent = (struct l_dirent*)lbuf; linux_dirent->d_ino = bdp->d_fileno; linux_dirent->d_off = bdp->d_off; linux_dirent->d_reclen = bdp->d_namlen; @@ -630,7 +629,7 @@ linux_readdir(struct thread *td, struct linux_readdir_args *args) if (error == 0) td->td_retval[0] = linuxreclen; - free(lbuf, M_TEMP); + free(linux_dirent, M_TEMP); out: free(buf, M_TEMP); return (error);