1 Index: linux-stage/fs/ext4/mballoc.c
2 ===================================================================
3 --- linux-stage.orig/fs/ext4/mballoc.c
4 +++ linux-stage/fs/ext4/mballoc.c
5 @@ -4352,7 +4352,7 @@ static void ext4_mb_add_n_trim(struct ex
6 /* The max size of hash table is PREALLOC_TB_SIZE */
7 order = PREALLOC_TB_SIZE - 1;
8 /* Add the prealloc space to lg */
10 + spin_lock(&lg->lg_prealloc_lock);
11 list_for_each_entry_rcu(tmp_pa, &lg->lg_prealloc_list[order],
13 spin_lock(&tmp_pa->pa_lock);
14 @@ -4376,7 +4376,7 @@ static void ext4_mb_add_n_trim(struct ex
16 list_add_tail_rcu(&pa->pa_inode_list,
17 &lg->lg_prealloc_list[order]);
19 + spin_unlock(&lg->lg_prealloc_lock);
21 /* Now trim the list to be not more than 8 elements */
22 if (lg_prealloc_count > 8) {