Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6134518iog; Thu, 23 Jun 2022 12:04:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1toTAxh1HS9e9s+Lmw50sb/7zwJ6Bx7WTMJ3vEAoLH8uf20IWW1uZtYb82DTRe04oXfIRld X-Received: by 2002:aa7:cb13:0:b0:433:4985:1b54 with SMTP id s19-20020aa7cb13000000b0043349851b54mr12574172edt.182.1656011069022; Thu, 23 Jun 2022 12:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011069; cv=none; d=google.com; s=arc-20160816; b=dZWXiw53FGTnc0ZwX0fPkggmmck+vGRC2ej1cHMhgjvSnp+EvpMtjtPV1jST83ag8Z Z4y+Vxam2b1+s/x2rRgRF0GknOxiD4s7m4O26MXPznvAv8hmrdNWN7eax6g/MU3rnN5S 1bzP8/khVuoREcoXxuEcndnkLv2JWT4EuclDkGl4QziQZXUPQkdF/l7648MVfaUGa624 WzEUC9t5YoBjTB9gqArGkXbCKst0Sx0YEfrjNydzhaeBMsGqUmQ1YRvSuACYQ6CMLM23 YKcQQvwq2RgP808vzr73v0I+6WBUdANmqrBTz7Y7dMkhSjo8JNk5SU/VLhiTeLI8T0Bl lJlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nbvp8xUdS42LjmtW5AVduXa9B6VAIGQLMJcsSavAGcE=; b=vkC4XrIXkGmb3kTsisUjVPZ4bW5XBreqvqorveu78dbMEAYQ9NvcjCj6t+EAkHHJEe SwnpiKkSia6nI9RX5+9/CmqFlQBKgbZybrSF+7iPmEfibpCh9u8uLZh9vfFEwPGgEbUE W2Zn4Uius4A1yGaffb9HDerK8XA8ys7ai40OWApSrLAWN7aSZ/+/Ycb9xdMtbvoI+GjS J6zsjnsy5CuLf1JAQQOeEnDq+Hz9dFmfHtLBvsq+Wf3WFP3OtskJ/2fqp9X7up5rBJlu U5e4Xk/IhKP7aof8UIp0IcHVe5ofe+SlRfYC3PQu3PKnUd7XQm+0WxlmgKzHLy4FoS9s ACmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r39z9ojV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fy12-20020a1709069f0c00b00722f70c72e5si4418987ejc.420.2022.06.23.12.04.03; Thu, 23 Jun 2022 12:04:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r39z9ojV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231766AbiFWSVw (ORCPT + 99 others); Thu, 23 Jun 2022 14:21:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237223AbiFWSSB (ORCPT ); Thu, 23 Jun 2022 14:18:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BFC1B6215; Thu, 23 Jun 2022 10:24:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 353C161B9F; Thu, 23 Jun 2022 17:24:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00D4BC3411B; Thu, 23 Jun 2022 17:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656005066; bh=mBZuvRSvRT/U8QZE8D+3CJmdS4KW+M6rSLjkzTSrsSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r39z9ojVsdXaFfnJQXyB8jcGquqqE/HlRRfp2gUY53oVocqmIK06kdiyFYCbOf4q9 YkVQ2M0IOZKw8ICW6ywvVObt4+1KTyEB6F5KxbsYAnkhv70jEs17f9z5/r8kwhm1bK nXsq+P1i8X42CBl2G6w83Bbxw8GqouflRvmglQb4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, stable@kernel.org, Ding Xiang , Theodore Tso Subject: [PATCH 4.19 218/234] ext4: make variable "count" signed Date: Thu, 23 Jun 2022 18:44:45 +0200 Message-Id: <20220623164349.220276743@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164343.042598055@linuxfoundation.org> References: <20220623164343.042598055@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ding Xiang commit bc75a6eb856cb1507fa907bf6c1eda91b3fef52f upstream. Since dx_make_map() may return -EFSCORRUPTED now, so change "count" to be a signed integer so we can correctly check for an error code returned by dx_make_map(). Fixes: 46c116b920eb ("ext4: verify dir block before splitting it") Cc: stable@kernel.org Signed-off-by: Ding Xiang Link: https://lore.kernel.org/r/20220530100047.537598-1-dingxiang@cmss.chinamobile.com Signed-off-by: Theodore Ts'o Signed-off-by: Greg Kroah-Hartman --- fs/ext4/namei.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1743,7 +1743,8 @@ static struct ext4_dir_entry_2 *do_split struct dx_hash_info *hinfo) { unsigned blocksize = dir->i_sb->s_blocksize; - unsigned count, continued; + unsigned continued; + int count; struct buffer_head *bh2; ext4_lblk_t newblock; u32 hash2;