Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757231AbZDOJLq (ORCPT ); Wed, 15 Apr 2009 05:11:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752506AbZDOJLg (ORCPT ); Wed, 15 Apr 2009 05:11:36 -0400 Received: from mx2.redhat.com ([66.187.237.31]:40979 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751837AbZDOJLg (ORCPT ); Wed, 15 Apr 2009 05:11:36 -0400 Date: Wed, 15 Apr 2009 17:11:26 +0800 From: Eugene Teo To: Yan Zheng Cc: linux-kernel@vger.kernel.org, eugeneteo@kernel.sg Subject: [PATCH] Btrfs: setting variable out of order Message-ID: <20090415091126.GA13323@kernel.sg> Reply-To: Eugene Teo MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1003 Lines: 27 This doesn't look intentional. Signed-off-by: Eugene Teo --- fs/btrfs/ctree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index e5b2533..6aa2468 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -3376,8 +3376,8 @@ int btrfs_insert_some_items(struct btrfs_trans_handle *trans, for (i = 0; i < nr; i++) { if (total_size + data_size[i] + sizeof(struct btrfs_item) > BTRFS_LEAF_DATA_SIZE(root)) { - break; nr = i; + break; } total_data += data_size[i]; total_size += data_size[i] + sizeof(struct btrfs_item); -- 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/