summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2011-06-03 01:13:45 -0400
committerChris Mason <chris.mason@oracle.com>2011-06-04 08:03:43 -0400
commit17aca1c987cff89dc4279371857035da902c8854 (patch)
treef63df32137d07ec9876f46542884b68a83e0a48c
parent1bc8779349d6278e2713a1ff94418c2a6746a791 (diff)
downloadlinux-17aca1c987cff89dc4279371857035da902c8854.tar.gz
linux-17aca1c987cff89dc4279371857035da902c8854.tar.bz2
linux-17aca1c987cff89dc4279371857035da902c8854.zip
Btrfs: fix uninit variable in the delayed inode code
The nitems counter needs to start at zero Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r--fs/btrfs/delayed-inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index b46d94d1dea8..c61c32cf0f71 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