Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 552A7C433F5 for ; Wed, 24 Nov 2021 13:54:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350424AbhKXN53 (ORCPT ); Wed, 24 Nov 2021 08:57:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:42264 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354923AbhKXNxc (ORCPT ); Wed, 24 Nov 2021 08:53:32 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C694C6326E; Wed, 24 Nov 2021 13:05:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637759128; bh=MyEvijg+7fEi0qn/5mp5Ggd7cijDbTy64fCbsBYCDt4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PXOi2vUstkKQuoQwiFXVqeDjj0lYuWQIlwJr23LF//Jwg2P3abOa00z3mhii7MRye DUdxJpbz5A+kaco6Puj4VWx/gOfUiDl+t89y0mUVG3TdJH8Rv8nKwtYFU7Y6xHUsqg /uj3oT6Mhtee6sqjzZYY27YeMG58hElfi8owo3ss= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Josef Bacik , Qu Wenruo , Colin Ian King , David Sterba , Sasha Levin Subject: [PATCH 5.15 141/279] btrfs: make 1-bit bit-fields of scrub_page unsigned int Date: Wed, 24 Nov 2021 12:57:08 +0100 Message-Id: <20211124115723.653499167@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115718.776172708@linuxfoundation.org> References: <20211124115718.776172708@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King [ Upstream commit d08e38b62327961295be1c63b562cd46ec97cd07 ] The bitfields have_csum and io_error are currently signed which is not recommended as the representation is an implementation defined behaviour. Fix this by making the bit-fields unsigned ints. Fixes: 2c36395430b0 ("btrfs: scrub: remove the anonymous structure from scrub_page") Reviewed-by: Josef Bacik Reviewed-by: Qu Wenruo Signed-off-by: Colin Ian King Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- fs/btrfs/scrub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 088641ba7a8e6..62f4bafbe54bb 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -73,8 +73,8 @@ struct scrub_page { u64 physical_for_dev_replace; atomic_t refs; u8 mirror_num; - int have_csum:1; - int io_error:1; + unsigned int have_csum:1; + unsigned int io_error:1; u8 csum[BTRFS_CSUM_SIZE]; struct scrub_recover *recover; -- 2.33.0