Showing error 1115

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: fs/xfs/xfs_log.c
Line in file: 3105
Project: Linux Kernel
Project version: 2.6.28
Tools: Clang Static Analyzer (3.0)
Entered: 2012-04-17 12:29:30 UTC


Source:

3075
3076no_sleep:
3077                spin_unlock(&log->l_icloglock);
3078        }
3079        return 0;
3080}        /* xlog_state_sync_all */
3081
3082
3083/*
3084 * Used by code which implements synchronous log forces.
3085 *
3086 * Find in-core log with lsn.
3087 *        If it is in the DIRTY state, just return.
3088 *        If it is in the ACTIVE state, move the in-core log into the WANT_SYNC
3089 *                state and go to sleep or return.
3090 *        If it is in any other state, go to sleep or return.
3091 *
3092 * If filesystem activity goes to zero, the iclog will get flushed only by
3093 * bdflush().
3094 */
3095STATIC int
3096xlog_state_sync(xlog_t          *log,
3097                xfs_lsn_t lsn,
3098                uint          flags,
3099                int          *log_flushed)
3100{
3101    xlog_in_core_t        *iclog;
3102    int                        already_slept = 0;
3103
3104try_again:
3105    spin_lock(&log->l_icloglock);
3106    iclog = log->l_iclog;
3107
3108    if (iclog->ic_state & XLOG_STATE_IOERROR) {
3109            spin_unlock(&log->l_icloglock);
3110            return XFS_ERROR(EIO);
3111    }
3112
3113    do {
3114        if (be64_to_cpu(iclog->ic_header.h_lsn) != lsn) {
3115                iclog = iclog->ic_next;
Show full sources