diff mbox

[3.0-rc1] delayed insertion allocation failing...

Message ID 1306782464-sup-7709@shiny (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Mason May 30, 2011, 7:11 p.m. UTC
Excerpts from Daniel J Blueman's message of 2011-05-30 10:24:08 -0400:
> Hi Miao,
> 
> When booting 3.0-rc1 with an existing BTRFS filesystem with a normal
> desktop use pattern, we see btrfs_batch_insert_item() sometimes
> attempt an overly-large kmalloc (>= order 11) [1], which is
> subsequently failed.

Wow, that's a big allocation.  Not really sure how this manages to
compile with a warning.

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index 01e2950..790262d 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -678,6 +678,7 @@  static int btrfs_batch_insert_items(struct btrfs_trans_handle *trans,
 	INIT_LIST_HEAD(&head);
 
 	next = item;
+	nitems = 0;
 
 	/*
 	 * count the number of the continuous items that we can insert in batch