Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3345220pxv; Sun, 4 Jul 2021 16:08:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymDUmURLB/mI8k3C7OVtl2/f0R7M6MbKWyJ1sWxA3wupuv6i8j4fJrINiq7l4jsKcMvdXP X-Received: by 2002:a05:6e02:ef4:: with SMTP id j20mr8442391ilk.141.1625440120838; Sun, 04 Jul 2021 16:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625440120; cv=none; d=google.com; s=arc-20160816; b=m4omAZYizV/Lzr2Cepf7oE5MvKz3yVAFVCUxPILnaAKUdEJrqHO/iBIr/cp3sgeXez AcOZG84Ey/h8iruE607rIT7zTi92HTWM2UJi9bG2a9XkX43IEJHW2l/qmd4kooOcuYT8 OMg5ukd+WLeJTlr1BgnFah6evnzDXuqPMFxm5UlezWLxg/ecufoKQrmISgFo2ey+igw5 ZNgkrmenWsWC9fByQrr11pn9TawEvP6rfADKNNF5L2BNib44tZ0eYr0EiYty/j8l5+8Y j8pNLdR+a5XJhl+hGApu6Lk9n4U7KqMGy6Y/nrALpiS6uOKD7H0/fwWUvY4OrwVUARv0 PzXg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=elHUb8/ifTHrZD0p0v/7N6pREKSOHXRC2110q70wqPo=; b=Hs4foYy9CAmHi+s3cynSmtYe58OIX9PCnkcG+EE4lRVaSUdmqTXOv5MVLbSv60hdtG ZdVnLVSg9324oFuWa2ezOuQdZHX0+F7WV3gRsox/gFUNz9cJuKGsp+xS8zMwuP3tsaRR pee4wDpqkmnoRrS3+B5IqwocspTXq7v+DNK+YmJOPuK/9Z73yQFCIh3nB7uZOcr+go1+ jRVKnpX1bNsfHudlbgUApc76cGkfSnaoYWgMmYOBHDKE4dbpCX7iFZHjvSKkFUEEKbIE IutwFU4ct/C07RQUxYFImoWiImULcCX3lJ287O5BF6TbNw4pglRRHGAZUDArts2DrBqZ 07HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sNXLuiBC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si16302906ilm.103.2021.07.04.16.08.28; Sun, 04 Jul 2021 16:08:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sNXLuiBC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230029AbhGDXJd (ORCPT + 99 others); Sun, 4 Jul 2021 19:09:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:47874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231325AbhGDXIf (ORCPT ); Sun, 4 Jul 2021 19:08:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0C18661946; Sun, 4 Jul 2021 23:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625439959; bh=mwyT0CnTFy0k8PpQGR1TNJY0zisSRYQ8wl4PXiE2MaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sNXLuiBCkdAHZWoLYD1QYLD03EoV2i5syqYuW5nTP2gS8RD1/NtdWnNIeO44goWHi 0yalzQ9NkNAfyrw9pXicnQQ/ZnQqeVXW3iZ7YRD991NWzohM+WVavqcgY4/l0BqFvm 4GBeWxFygZk199qz6bnxyUImCERKTgC5ni1lrA429w3bdA6EkgFBvuNY9pH2UxvB+I MJK5MfmjWteV2HQv1T0lmPAVG4VwUjx/YFfx2JVgI0k3iLwC6QGu3pJCzZDh/XRIDm tSqES7sSQn6Ay+AWk4IwihVUzdW1dMCIjQ7BAbbfSEvb7D0+ruJ+j/EhG99fUEl3Ro ma9IrY3uyJf9g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: David Sterba , Qu Wenruo , Anand Jain , Sasha Levin , linux-btrfs@vger.kernel.org Subject: [PATCH AUTOSEL 5.13 73/85] btrfs: sysfs: fix format string for some discard stats Date: Sun, 4 Jul 2021 19:04:08 -0400 Message-Id: <20210704230420.1488358-73-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210704230420.1488358-1-sashal@kernel.org> References: <20210704230420.1488358-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Sterba [ Upstream commit 8c5ec995616f1202ab92e195fd75d6f60d86f85c ] The type of discard_bitmap_bytes and discard_extent_bytes is u64 so the format should be %llu, though the actual values would hardly ever overflow to negative values. Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- fs/btrfs/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 436ac7b4b334..4f5b14cd3a19 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -429,7 +429,7 @@ static ssize_t btrfs_discard_bitmap_bytes_show(struct kobject *kobj, { struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); - return scnprintf(buf, PAGE_SIZE, "%lld\n", + return scnprintf(buf, PAGE_SIZE, "%llu\n", fs_info->discard_ctl.discard_bitmap_bytes); } BTRFS_ATTR(discard, discard_bitmap_bytes, btrfs_discard_bitmap_bytes_show); @@ -451,7 +451,7 @@ static ssize_t btrfs_discard_extent_bytes_show(struct kobject *kobj, { struct btrfs_fs_info *fs_info = discard_to_fs_info(kobj); - return scnprintf(buf, PAGE_SIZE, "%lld\n", + return scnprintf(buf, PAGE_SIZE, "%llu\n", fs_info->discard_ctl.discard_extent_bytes); } BTRFS_ATTR(discard, discard_extent_bytes, btrfs_discard_extent_bytes_show); -- 2.30.2