From nobody Tue Feb 20 21:46:41 2024 X-Original-To: dev-commits-src-branches@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 4TfXzj40mQz59hbG; Tue, 20 Feb 2024 21:46:41 +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 4TfXzj3W6Fz4qrB; Tue, 20 Feb 2024 21:46:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708465601; 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=K3RIt4zOm1PEBxIpRY/DdqiTehg97jmYYw7426GJyXo=; b=yXK3EMf2Un4GS2d6xTyEtv3HRF2ARMzz5IMXTlM7NVFC9Nd2ktEb2E36nPAXNfmuwrZMrZ x4SJ3FG4OaDMWpkmgrUkof45yanfS3Q0eSLOZxrxOtcdFltmYIh07D80+YI7CYzths9uga tScvcN9gI9JgivNU7bynn6dyr0HBnJECe84aqj/+FwnOBMEvkgwyKY5uljR0hBcmW5QiSQ /CqXnQ15La0zwU/L12reF1aT5ZKovfF4hQ+Y4Dp6ZedfdmuTbjoYKGcnkjUmRHrRVw0USC eGFZrzsusDQ2HeswpCqM3Tioh+stsmlVrY87cE/3CxLfazrqKqLg7YKRCzRlKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708465601; 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=K3RIt4zOm1PEBxIpRY/DdqiTehg97jmYYw7426GJyXo=; b=Ypf6YFl2WfisHBAKD7o9p48HK7qvrUM65TMdOcjFr2DeZkRQUBB3gUEe5KmIEV7QbPVeQ6 52K1+uYt0uWEaeGCWCfD5pgOzQK/+TaQ8r4vrdFkDj5mYGoewB8+cs+OMBGneRssf5FbqW O6tvz7BO/M9rbVxXk3Y5zF8+MlTokRphnu2tsZ7lHJXkg6OZn+hXZpmCicLqcf0rNUa+/P NnYKshFMVt9b0hG7MKw6RCwmmQLfCRaXBg96Qq/T/0f6LJmjij2ePQ/jnvNSQgfPunMmbJ hYTeTikas5JNPi527a+3+DQMGW7z1hZl/LGqT0P4uJUuFao4l7ORjYVGz1hyoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708465601; a=rsa-sha256; cv=none; b=n/NP9O7qndKAyO5ru0DXSDw3iaTKUAXbGTmE+yeme+3Ugq+Q75HJuOv6kipdoxImBlKKaE omV7A7X6X197k/0690QmKv3lFLdYURNTJnI0yA+ogo7jkaQ2p9Au9FoE0u+OCLEjWWUchk 0NU5bnioq7TczFD3PQfzTqygNCnM4Pi5zrD9D0oE7tkKqbw5nG8JH0RntzFAnfZE6rBqsB +9BAb2EpD9PUPt2f2U9JAH9oW3UxkiyP1wHR6zpkJ8cOqXdlvMZ9P0kw3aQFUZjSx0Ru6m Ev7gRYXl4v//aJ1sWSkt56uZdHtcwK9yb78unJJpFTEPTyeQwoy6fabDGdX0Lw== 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 4TfXzj2YWGzc2G; Tue, 20 Feb 2024 21:46:41 +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 41KLkfVn029132; Tue, 20 Feb 2024 21:46:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41KLkfsw029129; Tue, 20 Feb 2024 21:46:41 GMT (envelope-from git) Date: Tue, 20 Feb 2024 21:46:41 GMT Message-Id: <202402202146.41KLkfsw029129@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: 5f4753501e9c - stable/13 - msdosfs: fix directory corruption after rename operation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5f4753501e9cc59e0d15f849c9459478ea5c8dc7 Auto-Submitted: auto-generated The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=5f4753501e9cc59e0d15f849c9459478ea5c8dc7 commit 5f4753501e9cc59e0d15f849c9459478ea5c8dc7 Author: Stefan Eßer AuthorDate: 2024-02-17 21:04:49 +0000 Commit: Stefan Eßer CommitDate: 2024-02-20 21:45:53 +0000 msdosfs: fix directory corruption after rename operation (cherry picked from commit 8b67c670a49b4efe7e1557121b5bbae682ea3bc7) --- sys/fs/msdosfs/msdosfs_vnops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 1d296c019331..7d18ac623af4 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1192,8 +1192,10 @@ relock: memcpy(oldname, fip->de_Name, 11); memcpy(fip->de_Name, toname, 11); /* update denode */ error = msdosfs_lookup_ino(tdvp, NULL, tcnp, &scn, &blkoff); - if (error == EJUSTRETURN) + if (error == EJUSTRETURN) { + tdip->de_fndoffset = to_diroffset; error = createde(fip, tdip, NULL, tcnp); + } if (error != 0) { memcpy(fip->de_Name, oldname, 11); goto unlock;