From patchwork Fri Jul 23 22:46:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel J Blueman X-Patchwork-Id: 114019 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 o6NMkwwx027087 for ; Fri, 23 Jul 2010 22:46:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757417Ab0GWWqr (ORCPT ); Fri, 23 Jul 2010 18:46:47 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:60776 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756524Ab0GWWqq (ORCPT ); Fri, 23 Jul 2010 18:46:46 -0400 Received: by bwz1 with SMTP id 1so1881138bwz.19 for ; Fri, 23 Jul 2010 15:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=WVfv9Iz6EZ3hgbwygrpdsffwHI+lx4JJERvrbVzaTRw=; b=aEQ8s+TrEbYmmCDQ9qwc/WtYaYuyoim5HTk5ofwVBZFWRl8qw7zPlXmYEHfLsEaF6y GQtnqEJH9yK+F9Y/pRQY5vMzKKZBpXLGOlbarlmGeXOH+ekde5MdMTvdZSdICigH+ARd ww3GukOumIY3lwQ1mJs6ZmvHwQ/vRfEgMWQvc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=KW2pcBP9VwNcsEdkfY9wlW1vZmJZLKG7uqhYeUKZpAgku1gatTHGNlHMsjsHVoCFXp AU6+ZIh+kpsxqWgoMvpeMqyyybZT9RoVn1K3tGeYd/L+JOZdChUgMbe22ezhUC2SOYsj lFYKu4vezc2+hZvSvjFEQSdjtNvKlUsGCmmuo= MIME-Version: 1.0 Received: by 10.204.7.219 with SMTP id e27mr2735751bke.191.1279925205198; Fri, 23 Jul 2010 15:46:45 -0700 (PDT) Received: by 10.204.80.131 with HTTP; Fri, 23 Jul 2010 15:46:45 -0700 (PDT) Date: Fri, 23 Jul 2010 23:46:45 +0100 Message-ID: Subject: [2.6.35-rc6 patch] correct item insert accounting... From: Daniel J Blueman To: Chris Mason Cc: Linux BTRFS 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]); Fri, 23 Jul 2010 22:46:58 +0000 (UTC) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index c3df14c..fb7e20d 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -3544,8 +3544,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];