Ver Fonte

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>
Chris Mason há 14 anos atrás
pai
commit
17aca1c987
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      fs/btrfs/delayed-inode.c

+ 1 - 0
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