From nobody Mon Jan 02 03:30:39 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 4NlhG724tbz2ndCH; Mon, 2 Jan 2023 03:30: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 4NlhG71dvCz4YsB; Mon, 2 Jan 2023 03:30:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672630239; 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=0Bc2zs8wE7RAANPqd0S57NSxCNnTE2XPcXb8IdA5i4Q=; b=hCNU+TuQ6uMIHnL8UJgh0U5eHyAg2ApgmMuSxcgyla6b8FAVgtLVUf/YNZsdH3ygiyfu0y VVUwwsZvFavEC9vcrqV1RxWn7emgjf5/heJDILsGIz6TRQ8uxryMv/Q9ZOa9jFTE/2O5cW LZk65aD5avmkoGR63SDRhfjlU0nq9F+IIDodGcuIALMWbLfGh2tZyZ6EXZdoQRTrGvvNZN XBZHWcRiRUmORKbsoHA5eB9NYcLSesezQbGymuHKKH1VXBR/h0s0SjOWt46e5Iq0SvaGtk 5ap8yPELC68xdrK6DjIWdeFQueQjT3seV96BsO3dEbvp55IZL8n5wJx4NWGtjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672630239; 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=0Bc2zs8wE7RAANPqd0S57NSxCNnTE2XPcXb8IdA5i4Q=; b=tElLWOlJThBmXrfZIwaPB1Uvi/813uCTOJaoUMX63jaCws5ykKbUv+W/RF5c1PnLMPRITR rgvSkgQjbd0bR3bWB3FPL8RI/lMrp5II8Ey5uX+5nrgzIRoF88+Ii8zIbKCQ2sYJvTVBXg 2G42b6fUx3TzDjMDKgz/RJT2CLLOsV7wwqs2zT0gf/5vDJIkOY7sDObv55dQniTwXvs5Qf PKNbKlAONWvbokf2sXHILKcYka5+n00HREsyYQaFP3JabzxM9i6V4hwjJD/R5jU2SJD8zi tf8JVxBndZPi6VEWwxLid/m1Aft8VtUYTRE2dYztxbXGzjSub9W8ichAoR/xyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672630239; a=rsa-sha256; cv=none; b=M1PGcXUY+AXQzYdAMoGA3rjTCJSj+NNJb+Z5lD2qp4tzJKQrayOQxzvU6UWOCFcb0oGD3g 1xuCre5pY5YlPRs/NvmBGwrr1pSQLNUZ2DwEM4BE/mNWa76kUx0LfdHAkjWa1KLWegicJ4 ejqOjBV61lrKYm6HyYUWL4iPLlliqMk/H3ZvHTi0IrMbUaarp2QT3JR7JRd9G06Y755XE2 UWWEKxunCVU2p1fAnnsfwZBtK3CtBUfBvUUSbETkviatWuEQ0WC+Jd/DI9oqy931G6nx28 jyRJQiN1oPykD0LHPmuMdEtegqMn0NwTwl67tRufAB4y6AY9QIJJRCPVyKYlsw== 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 4NlhG70j0szsYw; Mon, 2 Jan 2023 03:30:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3023Udf3028358; Mon, 2 Jan 2023 03:30:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3023UdvV028357; Mon, 2 Jan 2023 03:30:39 GMT (envelope-from git) Date: Mon, 2 Jan 2023 03:30:39 GMT Message-Id: <202301020330.3023UdvV028357@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: e84e44215fe1 - main - Fix vop_readdir's ncookies handling in UFS and EXT2. 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: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e84e44215fe19dad4d1779d5ee0b2f2d2739f016 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=e84e44215fe19dad4d1779d5ee0b2f2d2739f016 commit e84e44215fe19dad4d1779d5ee0b2f2d2739f016 Author: Kirk McKusick AuthorDate: 2023-01-02 03:29:43 +0000 Commit: Kirk McKusick CommitDate: 2023-01-02 03:30:14 +0000 Fix vop_readdir's ncookies handling in UFS and EXT2. Submitted by: Kusumi Tomohiro PR: 267706 MFC after: 1 week --- sys/fs/ext2fs/ext2_lookup.c | 2 +- sys/ufs/ufs/ufs_vnops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/ext2fs/ext2_lookup.c b/sys/fs/ext2fs/ext2_lookup.c index 16f2aa88b28c..67409a5e2a17 100644 --- a/sys/fs/ext2fs/ext2_lookup.c +++ b/sys/fs/ext2fs/ext2_lookup.c @@ -265,7 +265,7 @@ nextentry: error = 0; if (ap->a_ncookies != NULL) { if (error == 0) { - ap->a_ncookies -= ncookies; + *ap->a_ncookies -= ncookies; } else { free(*ap->a_cookies, M_TEMP); *ap->a_ncookies = 0; diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index ecb8cb6900ca..93a5b173b785 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -2511,7 +2511,7 @@ nextentry: error = 0; if (ap->a_ncookies != NULL) { if (error == 0) { - ap->a_ncookies -= ncookies; + *ap->a_ncookies -= ncookies; } else { free(*ap->a_cookies, M_TEMP); *ap->a_ncookies = 0;