Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753555AbaJ1DgO (ORCPT ); Mon, 27 Oct 2014 23:36:14 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44265 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753239AbaJ1DgI (ORCPT ); Mon, 27 Oct 2014 23:36:08 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Qu Wenruo , Chris Mason Subject: [PATCH 3.17 011/146] btrfs: Fix the wrong condition judgment about subset extent map Date: Tue, 28 Oct 2014 11:32:33 +0800 Message-Id: <20141028033343.923305147@linuxfoundation.org> X-Mailer: git-send-email 2.1.2 In-Reply-To: <20141028033343.441992423@linuxfoundation.org> References: <20141028033343.441992423@linuxfoundation.org> User-Agent: quilt/0.63-1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Qu Wenruo commit 32be3a1ac6d09576c57063c6c350ca36eaebdbd3 upstream. Previous commit: btrfs: Fix and enhance merge_extent_mapping() to insert best fitted extent map is using wrong condition to judgement whether the range is a subset of a existing extent map. This may cause bug in btrfs no-holes mode. This patch will correct the judgment and fix the bug. Signed-off-by: Qu Wenruo Signed-off-by: Chris Mason Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6528,7 +6528,7 @@ insert: * extent causing the -EEXIST. */ if (start >= extent_map_end(existing) || - start + len <= existing->start) { + start <= existing->start) { /* * The existing extent map is the one nearest to * the [start, start + len) range which overlaps -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/