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/xfs/xfs_log.c |
Line in file: | 789 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
|
Entered: | 2012-03-02 21:35:18 UTC |
759 * Go through the motions of sync'ing and releasing 760 * the iclog, even though no I/O will actually happen, 761 * we need to wait for other log I/Os that may already 762 * be in progress. Do this as a separate section of 763 * code so we'll know if we ever get stuck here that 764 * we're in this odd situation of trying to unmount 765 * a file system that went into forced_shutdown as 766 * the result of an unmount.. 767 */ 768 spin_lock(&log->l_icloglock); 769 iclog = log->l_iclog; 770 atomic_inc(&iclog->ic_refcnt); 771 spin_unlock(&log->l_icloglock); 772 773 xlog_state_want_sync(log, iclog); 774 error = xlog_state_release_iclog(log, iclog); 775 776 spin_lock(&log->l_icloglock); 777 778 if ( ! ( iclog->ic_state == XLOG_STATE_ACTIVE 779 || iclog->ic_state == XLOG_STATE_DIRTY 780 || iclog->ic_state == XLOG_STATE_IOERROR) ) { 781 782 sv_wait(&iclog->ic_force_wait, PMEM, 783 &log->l_icloglock, s); 784 } else { 785 spin_unlock(&log->l_icloglock); 786 } 787 } 788 789 return error; 790} /* xfs_log_unmount_write */ 791 792/* 793 * Deallocate log structures for unmount/relocation. 794 * 795 * We need to stop the aild from running before we destroy 796 * and deallocate the log as the aild references the log. 797 */ 798void 799xfs_log_unmount_dealloc(xfs_mount_t *mp)