Showing error 641

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: fs/xfs/xfs_log.c
Line in file: 2879
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:57 UTC


Source:

2849        xlog_verify_grant_head(log, 1);
2850        spin_unlock(&log->l_grant_lock);
2851        xfs_log_move_tail(log->l_mp, 1);
2852}        /* xlog_ungrant_log_space */
2853
2854
2855/*
2856 * Flush iclog to disk if this is the last reference to the given iclog and
2857 * the WANT_SYNC bit is set.
2858 *
2859 * When this function is entered, the iclog is not necessarily in the
2860 * WANT_SYNC state.  It may be sitting around waiting to get filled.
2861 *
2862 *
2863 */
2864STATIC int
2865xlog_state_release_iclog(
2866        xlog_t                *log,
2867        xlog_in_core_t        *iclog)
2868{
2869        int                sync = 0;        /* do we sync? */
2870
2871        if (iclog->ic_state & XLOG_STATE_IOERROR)
2872                return XFS_ERROR(EIO);
2873
2874        ASSERT(atomic_read(&iclog->ic_refcnt) > 0);
2875        if (!atomic_dec_and_lock(&iclog->ic_refcnt, &log->l_icloglock))
2876                return 0;
2877
2878        if (iclog->ic_state & XLOG_STATE_IOERROR) {
2879                spin_unlock(&log->l_icloglock);
2880                return XFS_ERROR(EIO);
2881        }
2882        ASSERT(iclog->ic_state == XLOG_STATE_ACTIVE ||
2883               iclog->ic_state == XLOG_STATE_WANT_SYNC);
2884
2885        if (iclog->ic_state == XLOG_STATE_WANT_SYNC) {
2886                /* update tail before writing to iclog */
2887                xlog_assign_tail_lsn(log->l_mp);
2888                sync++;
2889                iclog->ic_state = XLOG_STATE_SYNCING;
Show full sources