Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp811593pxu; Thu, 26 Nov 2020 12:35:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzaCsGI2xRAJlqhp/FS8myUJiIdTyLJEtm9X67uZSyXI0Y3wkvVxy9S9udxY6zW+TbWzReL X-Received: by 2002:a50:ec09:: with SMTP id g9mr4341628edr.38.1606422937159; Thu, 26 Nov 2020 12:35:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606422937; cv=none; d=google.com; s=arc-20160816; b=0oF4aF2Bvdap05Ena9gkp8WJpzjz9DOIDQnveBixwyTmnsg7cj8iIDmZ22/c1WRlZ2 y0F6qdl+uQqHyy1pGiYipKsdM70h+DCJFgSmyAAieDsYB6UY0tawKTj+qVUExmfV+1Bf K6L3yYGGxQZCeoxBju/YsrS7Be7wehdXwPk7SruqCS25yaY7xXabSPZAK8SpBGAIexcw woEwWik3mqpCQPtRoy6DvRilyR1uXAi2Dbpfuw77S7bafNLxOjib9fXqfpwfGnNy33Xf bq7KN53UDekebwN8zgcaI1DnVvkW96X9YMALFfKoaxOpHMVA/iVrCCzNTRFBEdM3JBXJ 4dnA== 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=J8N8fXi3orShS8WY4wwQ2HEoDMGIdvv0f2498O+ITQY=; b=dOEl1yR193c4+DJOC20xZiVLuTFEbaf1MvWSj927UaHECfsTMysYORMClSb4teNXhE 6hIJd7PYU80Htx00J9nNrNEHvz3SERzOLAqo9glh01hW252/lS+ArJ+Mr0wv8UkaJCR0 539/ERy9idVVl5egKxH6Srr2xVT1t5nRuJux6yu2L04sOQD15fABvjadO5WalInhuNFz Kmc/89JmZKI9G2L0SGkGJHSwV7LZgtVYRr6znesI5xo4bZtEu6u29UUpURSCDB/zNdNf Jhk2adbiTY4T9q9fwnkJ3VvgO+GFKA57iXDzUG1/S+r1KBuymshtAYGjf7DOL95YDHee Yz2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pbWylj94; 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 a23si3685941ejy.682.2020.11.26.12.34.49; Thu, 26 Nov 2020 12:35:37 -0800 (PST) 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=default header.b=pbWylj94; 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 S1733262AbgKZCYW (ORCPT + 99 others); Wed, 25 Nov 2020 21:24:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:33582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733228AbgKZCYT (ORCPT ); Wed, 25 Nov 2020 21:24:19 -0500 Received: from localhost (unknown [104.132.1.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2850C2075A; Thu, 26 Nov 2020 02:24:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606357459; bh=6XA/qLOngyDBniW52sdY2h+RkRTLQMuD9eGtpZ7QD58=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pbWylj94aEe5yLGR1ytq1uLUyNwVrbA9vB/J/Nt7E70LoOQH4/TMN6rl25PXXXzT3 LdzIU/Ml62KHkIhD3lRC/bJodgO7q2745ImC/PZjC9fdhXvhuy6EHZet/ijaK3fnJy 8c83CHjtZIXBZE9z6wZBHG2736slW+Strzin8thQ= From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, kernel-team@android.com Cc: Jaegeuk Kim Subject: [PATCH 3/4] f2fs: fix wrong block count instead of bytes Date: Wed, 25 Nov 2020 18:24:15 -0800 Message-Id: <20201126022416.3068426-3-jaegeuk@kernel.org> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog In-Reply-To: <20201126022416.3068426-1-jaegeuk@kernel.org> References: <20201126022416.3068426-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should convert cur_lblock, a block count, to bytes for len. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index a84e5bc09337..e49c14ccfafe 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3893,7 +3893,7 @@ static int check_swap_activate_fast(struct swap_info_struct *sis, sector_t highest_pblock = 0; int nr_extents = 0; unsigned long nr_pblocks; - unsigned long len; + u64 len; int ret; /* @@ -3911,7 +3911,7 @@ static int check_swap_activate_fast(struct swap_info_struct *sis, cond_resched(); memset(&map_bh, 0, sizeof(struct buffer_head)); - map_bh.b_size = len - cur_lblock; + map_bh.b_size = len - blks_to_bytes(inode, cur_lblock); ret = get_data_block(inode, cur_lblock, &map_bh, 0, F2FS_GET_BLOCK_FIEMAP, &next_pgofs); -- 2.29.2.454.gaff20da3a2-goog