Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3346281pxv; Sun, 4 Jul 2021 16:10:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS5GXDjYcchvEsEWGfDSaUel60zzSrQCkPzTX22GXGTMWpdMeycbOQmKT3S2GhR1MqQhor X-Received: by 2002:a05:6e02:80a:: with SMTP id u10mr8251088ilm.298.1625440243951; Sun, 04 Jul 2021 16:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625440243; cv=none; d=google.com; s=arc-20160816; b=PGlY7rrgSmSWobrjSP2Tn9M72BPM9EYeAPAny99ysKudsHPH7x++xfujrRjuofvSrI IRRq7fyrEtBDGsQCZ4oXCFSXGWDmTbO+8cMBj8numjRXRJLGrWvi0/RNg3/hs0YMPsCU 9V8VVFi5m4KLFk+GGoavIrvZSPRSYVrmUaAThQS8AL9PydIuxWpdgzqG43jb5cjxp27y vaKqp/B8oRCiW3uEhUzTBQoWZrOho2dDXViTt/J2pnICxMEBf0kBN5B2yD0UEVam2PAQ x82meypLOjOzfD0OcJgwsrL48H9JhkjpbFZNtxt6QSsr/DLVNGXwwKHs7Zx0+4Xh8Z5w J1kw== 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=HfS+hTLOseudfND+QI6qWHBUUSilUG07ah8TFliwU6E=; b=pYJTgR9ROa05YmNPRiRTnMh+oFqcogXvMkWpK88cRPM0Z4n/lGlgu/JiJTqNci7ZwI pkgZJefBjSRDco7VL/K+sd6DUlM1n8R96XAf3nzJ4+vlvoy4PWoFH+e8MDIY9VuaD6fd BzfcJHCeHtqnew5nLjkiRwITi6t+4l+qdCLHUg10dB2QvOYlUU55vbFlCgu4929XTG34 OP8zY8OEFtH2xl9b8Ny3JwDCq/Batruogj+EsO5xA/d7eVEs89S9saLX4J1RQJHLmoJg 3xlO/Z6YdpdmE69bOOFFol/iSdF82dTak4QEVpIShAg4KO6gahlRE5ek9oMnDxuuMcgs cj7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NlB5xEyh; 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 z6si12929067ilz.73.2021.07.04.16.10.32; Sun, 04 Jul 2021 16:10:43 -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=NlB5xEyh; 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 S231993AbhGDXMm (ORCPT + 99 others); Sun, 4 Jul 2021 19:12:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:47420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231460AbhGDXKZ (ORCPT ); Sun, 4 Jul 2021 19:10:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 31AB861452; Sun, 4 Jul 2021 23:07:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625440068; bh=H23AYYvulrpKBUSOuzXm0fdjY1KZV6XWaW5BPoth7mM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NlB5xEyhaZG04NSff5x82q6jWYDNPsN/O4DY3/VHzWyQMv2apKszDw+NlThcegHJX Ptyv97b4K01/RzpGhWQ0tI5Ol7UALhASoQUiP0Yv1jH+LAv1YBx3IBCc/JchXGFwSr yXO+DR9bN/g3B+RHY6GE9mDynNlJE462puE0vadlYn84WxKVFf2AqOXs+LvOW3LJGG VoEP5Utm2S6/GHfuTayHuKpdy7s+mxOJhhS43/Qd4ALiIpXM8GYLQhaDvbbGZQDWnD Kgezuj1sFraC6L1wuVTZG57UuNor9Nb4z0/ZHufRKGikf4yCwnRiefpvjtCSO7uRR+ uXIWwD8RkHYMw== 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.12 69/80] btrfs: sysfs: fix format string for some discard stats Date: Sun, 4 Jul 2021 19:06:05 -0400 Message-Id: <20210704230616.1489200-69-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210704230616.1489200-1-sashal@kernel.org> References: <20210704230616.1489200-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 6eb1c50fa98c..bd95446869d0 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -414,7 +414,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); @@ -436,7 +436,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