diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2009-02-14 10:31:16 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-02-14 10:31:16 -0500 |
commit | d794bf8e0936dce45104565cd48c571061f4c1e3 (patch) | |
tree | ad23776b739eb551b520865e837a106a7b628819 /fs/ext4/mballoc.c | |
parent | ba4439165f0f0d25b2fe065cf0c1ff8130b802eb (diff) |
ext4: Initialize preallocation list_head's properly
When creating a new ext4_prealloc_space structure, we have to
initialize its list_head pointers before we add them to any prealloc
lists. Otherwise, with list debug enabled, we will get list
corruption warnings.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r-- | fs/ext4/mballoc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index c962d0690505..4415beeb0b62 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -3693,6 +3693,8 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac) | |||
3693 | pa->pa_free = pa->pa_len; | 3693 | pa->pa_free = pa->pa_len; |
3694 | atomic_set(&pa->pa_count, 1); | 3694 | atomic_set(&pa->pa_count, 1); |
3695 | spin_lock_init(&pa->pa_lock); | 3695 | spin_lock_init(&pa->pa_lock); |
3696 | INIT_LIST_HEAD(&pa->pa_inode_list); | ||
3697 | INIT_LIST_HEAD(&pa->pa_group_list); | ||
3696 | pa->pa_deleted = 0; | 3698 | pa->pa_deleted = 0; |
3697 | pa->pa_linear = 0; | 3699 | pa->pa_linear = 0; |
3698 | 3700 | ||
@@ -3755,6 +3757,7 @@ ext4_mb_new_group_pa(struct ext4_allocation_context *ac) | |||
3755 | atomic_set(&pa->pa_count, 1); | 3757 | atomic_set(&pa->pa_count, 1); |
3756 | spin_lock_init(&pa->pa_lock); | 3758 | spin_lock_init(&pa->pa_lock); |
3757 | INIT_LIST_HEAD(&pa->pa_inode_list); | 3759 | INIT_LIST_HEAD(&pa->pa_inode_list); |
3760 | INIT_LIST_HEAD(&pa->pa_group_list); | ||
3758 | pa->pa_deleted = 0; | 3761 | pa->pa_deleted = 0; |
3759 | pa->pa_linear = 1; | 3762 | pa->pa_linear = 1; |
3760 | 3763 | ||