User: | Jiri Slaby |
Error type: | Leaving function in locked state |
Error type description: | Some lock is not unlocked on all paths of a function, so it is leaked |
File location: | fs/ext4/mballoc.c |
Line in file: | 4218 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Undetermined 1
Stanse (1.2) |
Entered: | 2012-03-04 17:07:06 UTC |
4188 pa_inode_list) { 4189 spin_lock(&tmp_pa->pa_lock); 4190 if (tmp_pa->pa_deleted) { 4191 spin_unlock(&pa->pa_lock); 4192 continue; 4193 } 4194 if (!added && pa->pa_free < tmp_pa->pa_free) { 4195 /* Add to the tail of the previous entry */ 4196 list_add_tail_rcu(&pa->pa_inode_list, 4197 &tmp_pa->pa_inode_list); 4198 added = 1; 4199 /* 4200 * we want to count the total 4201 * number of entries in the list 4202 */ 4203 } 4204 spin_unlock(&tmp_pa->pa_lock); 4205 lg_prealloc_count++; 4206 } 4207 if (!added) 4208 list_add_tail_rcu(&pa->pa_inode_list, 4209 &lg->lg_prealloc_list[order]); 4210 rcu_read_unlock(); 4211 4212 /* Now trim the list to be not more than 8 elements */ 4213 if (lg_prealloc_count > 8) { 4214 ext4_mb_discard_lg_preallocations(sb, lg, 4215 order, lg_prealloc_count); 4216 return; 4217 } 4218 return ; 4219} 4220 4221/* 4222 * release all resource we used in allocation 4223 */ 4224static int ext4_mb_release_context(struct ext4_allocation_context *ac) 4225{ 4226 struct ext4_prealloc_space *pa = ac->ac_pa; 4227 if (pa) { 4228 if (pa->pa_linear) {