From owner-dev-commits-src-branches@freebsd.org Fri Apr 2 21:49:41 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1D7B5B34D3; Fri, 2 Apr 2021 21:49: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 4FBtxd5zK6z4S0g; Fri, 2 Apr 2021 21:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 C0483272C4; Fri, 2 Apr 2021 21:49:41 +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 132Lnfxn017736; Fri, 2 Apr 2021 21:49:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 132Lnf4S017735; Fri, 2 Apr 2021 21:49:41 GMT (envelope-from git) Date: Fri, 2 Apr 2021 21:49:41 GMT Message-Id: <202104022149.132Lnf4S017735@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: fab7c18ce322 - stable/13 - Fix fsck_ffs Pass 1b error exit "bad inode number 2 to nextinode". 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/stable/13 X-Git-Reftype: branch X-Git-Commit: fab7c18ce3229d53b732fdfdbb6e9a1a1c72739a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2021 21:49:42 -0000 The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=fab7c18ce3229d53b732fdfdbb6e9a1a1c72739a commit fab7c18ce3229d53b732fdfdbb6e9a1a1c72739a Author: Kirk McKusick AuthorDate: 2021-03-24 23:50:24 +0000 Commit: Kirk McKusick CommitDate: 2021-04-02 21:52:49 +0000 Fix fsck_ffs Pass 1b error exit "bad inode number 2 to nextinode". (cherry picked from commit bc444e2ec6e6cc9d96d35ab7ce3c02c0da952fad) --- sbin/fsck_ffs/pass1b.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sbin/fsck_ffs/pass1b.c b/sbin/fsck_ffs/pass1b.c index 8c09ef36acad..b44e0107c982 100644 --- a/sbin/fsck_ffs/pass1b.c +++ b/sbin/fsck_ffs/pass1b.c @@ -78,8 +78,10 @@ pass1b(void) continue; setinodebuf(c, inosused); for (i = 0; i < inosused; i++, inumber++) { - if (inumber < UFS_ROOTINO) + if (inumber < UFS_ROOTINO) { + (void)getnextinode(inumber, 0); continue; + } dp = getnextinode(inumber, 0); idesc.id_number = inumber; idesc.id_type = inoinfo(inumber)->ino_idtype;