Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Dec 2022 00:38:18 GMT
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 143e60a9e963 - stable/13 - Correct calculation of inode location in getnextino cache.
Message-ID:  <202212110038.2BB0cIrA003922@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mckusick:

URL: https://cgit.FreeBSD.org/src/commit/?id=143e60a9e963a83a4d0e6ba1fcb6d7e9e27dbe94

commit 143e60a9e963a83a4d0e6ba1fcb6d7e9e27dbe94
Author:     Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2022-08-29 06:44:35 +0000
Commit:     Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2022-12-11 00:37:17 +0000

    Correct calculation of inode location in getnextino cache.
    
    (cherry picked from commit 827622937efa741d5d84d72968cf1580a8c597d8)
    
    Sponsored by: The FreeBSD Foundation
---
 sbin/fsck_ffs/inode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c
index 1d65ec667d44..f0699aabe349 100644
--- a/sbin/fsck_ffs/inode.c
+++ b/sbin/fsck_ffs/inode.c
@@ -460,11 +460,11 @@ ginode(ino_t inumber, struct inode *ip)
 	}
 	if (sblock.fs_magic == FS_UFS1_MAGIC) {
 		ip->i_dp = (union dinode *)
-		    &ip->i_bp->b_un.b_dinode1[inumber - firstinum];
+		    &ip->i_bp->b_un.b_dinode1[inumber - ip->i_bp->b_index];
 		return;
 	}
 	ip->i_dp = (union dinode *)
-	    &ip->i_bp->b_un.b_dinode2[inumber - firstinum];
+	    &ip->i_bp->b_un.b_dinode2[inumber - ip->i_bp->b_index];
 	if (ffs_verify_dinode_ckhash(&sblock, (struct ufs2_dinode *)ip->i_dp)) {
 		pwarn("INODE CHECK-HASH FAILED");
 		prtinode(ip);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212110038.2BB0cIrA003922>