Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4592049pja; Thu, 21 Nov 2019 22:27:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxjgS3leTpFzoeYkQQwArvm6RqwVx7cyebawOyTuv1eWo8gAEu3+xkqRzH8eTnUHn/2um4T X-Received: by 2002:a17:906:bfe3:: with SMTP id vr3mr19616477ejb.273.1574404073664; Thu, 21 Nov 2019 22:27:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574404073; cv=none; d=google.com; s=arc-20160816; b=byCBSTFAWLLMpoxO5GDGnJ3XcdSBPD97O9djg54Uw3z5u/+X8cDEUcphnfcO07xFiq f2hmyUHfSCg1mT8xxrk0DmYfg9KbetI8XiNRKrvarRA3giXD+ARFZ/vgE6ghDnttMPez jjVaRzaDcc5Ztg4CWeWY4fyNOWKtxdxEthBPg+IPgwKEuJuuwjCaLjkvGCvVGFB/SztO T4QBe9E1806beRxv8vGYSPeNRRDucNPO9ou/72h6u+x+coutNkH4pImBBl1Qx9h25jo2 ki6a7hl5QwKi5TH6yqqfg88GVhJXKyWJ6H0ACrCNkyyItL6ewOU31ELSdX8WRybT2M+4 zn7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dOlEEsN1sM/ZeY3wtKXF1hCnfWPtlHPpkHhsec7O77Y=; b=l6SNfwYoTRL8emBMuK62uRLLBLxdKVX8wQ0nTsww7AFSKIw6JPxn4txlDnxJqvIwi4 3Xee2aEp0wS2P0g1+eb5fkeUkBlr+GSzmlcvtiTfDhrJQLK8gEKseA7HG9hfix2XGZfB tm1qd0H7fpLKM8KMaZngtNJ8sDxJ+q66+oMkTlhBx1/bDzp41p1MT2fUhnQkUHSUz12l kIxXfZ7x8ZYz4RmArjNHrH34roKp0Uj3d/va4FcvpqYghUCuuRSJ3cTO2LKSRaXCLXR+ Pi011TZrbEgiKwxHEFBxcC4vtaRHRUzDXkams6tCx4We7c4hEocpoWJjJaTtMBEX2MVS OXkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rVpGJBIF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id a4si3312820ejy.439.2019.11.21.22.27.29; Thu, 21 Nov 2019 22:27:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rVpGJBIF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728990AbfKVGXH (ORCPT + 99 others); Fri, 22 Nov 2019 01:23:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:57166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728298AbfKVFvv (ORCPT ); Fri, 22 Nov 2019 00:51:51 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0916520717; Fri, 22 Nov 2019 05:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401910; bh=pnHoMJ/VIf/bpAE19w6W//LfMUwzElYtDIiJ9wLpwgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rVpGJBIFVn9ld64xGBlidcb1MVObsr3xoN5VZeHEw3BojbKasOoWgHvZzvT8HspwT SxNFD44RR/9DN4U6ZaidiTDa+ysR7PIycotTimvc05BqzBn8GRexr5J7G0MyCf7qhG auL0SqARIlpdOlIeg1irbs6IBU/WN59fBpFLR1to= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Qiuyang Sun , Chao Yu , Jaegeuk Kim , Sasha Levin , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH AUTOSEL 4.19 141/219] f2fs: fix block address for __check_sit_bitmap Date: Fri, 22 Nov 2019 00:47:53 -0500 Message-Id: <20191122054911.1750-134-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qiuyang Sun [ Upstream commit 9249dded7b5cb539a8c8698b25d08a3c15261470 ] Should use lstart (logical start address) instead of start (in dev) here. This fixes a bug in multi-device scenarios. Signed-off-by: Qiuyang Sun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 10d5dcdb34be6..01cb87b12d40b 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1101,7 +1101,7 @@ static int __submit_discard_cmd(struct f2fs_sb_info *sbi, list_move_tail(&dc->list, wait_list); /* sanity check on discard range */ - __check_sit_bitmap(sbi, start, start + len); + __check_sit_bitmap(sbi, lstart, lstart + len); bio->bi_private = dc; bio->bi_end_io = f2fs_submit_discard_endio; -- 2.20.1