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/fs-writeback.c |
Line in file: | 411 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Undetermined 1
|
Entered: | 2012-03-04 17:07:06 UTC |
381 WARN_ON(!(inode->i_state & (I_WILL_FREE|I_FREEING))); 382 else 383 WARN_ON(inode->i_state & I_WILL_FREE); 384 385 if ((wbc->sync_mode != WB_SYNC_ALL) && (inode->i_state & I_SYNC)) { 386 /* 387 * We're skipping this inode because it's locked, and we're not 388 * doing writeback-for-data-integrity. Move it to s_more_io so 389 * that writeback can proceed with the other inodes on s_io. 390 * We'll have another go at writing back this inode when we 391 * completed a full scan of s_io. 392 */ 393 requeue_io(inode); 394 return 0; 395 } 396 397 /* 398 * It's a data-integrity sync. We must wait. 399 */ 400 if (inode->i_state & I_SYNC) { 401 DEFINE_WAIT_BIT(wq, &inode->i_state, __I_SYNC); 402 403 wqh = bit_waitqueue(&inode->i_state, __I_SYNC); 404 do { 405 spin_unlock(&inode_lock); 406 __wait_on_bit(wqh, &wq, inode_wait, 407 TASK_UNINTERRUPTIBLE); 408 spin_lock(&inode_lock); 409 } while (inode->i_state & I_SYNC); 410 } 411 return __sync_single_inode(inode, wbc); 412} 413 414/* 415 * Write out a superblock's list of dirty inodes. A wait will be performed 416 * upon no inodes, all inodes or the final one, depending upon sync_mode. 417 * 418 * If older_than_this is non-NULL, then only write out inodes which 419 * had their first dirtying at a time earlier than *older_than_this. 420 * 421 * If we're a pdlfush thread, then implement pdflush collision avoidance