From patchwork Mon Jun 28 11:17:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 108339 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5SBJfX7002603 for ; Mon, 28 Jun 2010 11:19:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751398Ab0F1LTW (ORCPT ); Mon, 28 Jun 2010 07:19:22 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:46975 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182Ab0F1LTU (ORCPT ); Mon, 28 Jun 2010 07:19:20 -0400 Received: by fxm14 with SMTP id 14so533397fxm.19 for ; Mon, 28 Jun 2010 04:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=tm9RDvugFUUBcyXLH5blXYx8zdjlHANWNOs3vmUwdCg=; b=Zx92HGqMPI8flMEw163nB1/mj2DmWmbzSXWMu5tG7KutRLOkVvf5tnrd1Ezeu/1qqC sbKUi7E4vNFpZVTM/rbDs9Khg+ZgwqIxQEIXBk3H/LV1hoyZ+9rhdify8/Q3rI3sIgXZ ccl6u08GaXkZWu35RMx2rXiLo437c6DSBOKFg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=VvpZkDlsUVNH5eyhzUdFDxwy5HL1i7tqwJCIo9HdIkhOn/xmsJR5jRF4dQ/ddBHIrL Vgp4wVjLoKEsbUuESM/aqq6ONvaVo3GSEfW7l6kbRD0o4MSMLneo+6tWSffIYOxiIan4 0g4u2RFmGiIK2hIkbLs1Xqf5VdDqGVfJKC+eA= Received: by 10.223.124.202 with SMTP id v10mr3737281far.49.1277723958871; Mon, 28 Jun 2010 04:19:18 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id 2sm50717832fav.1.2010.06.28.04.18.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 28 Jun 2010 04:19:18 -0700 (PDT) Date: Mon, 28 Jun 2010 13:17:26 +0200 From: Dan Carpenter To: Chris Mason Cc: Yan Zheng , Diego Calleja , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] btrfs: make code reachable in btrfs_insert_some_items() Message-ID: <20100628111726.GI19184@bicker> Mail-Followup-To: Dan Carpenter , Chris Mason , Yan Zheng , Diego Calleja , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 28 Jun 2010 11:19:42 +0000 (UTC) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 0d1d966..ceb8ad2 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -3453,8 +3453,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);