Showing error 615

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: 2894
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:57 UTC


Source:

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;
2890                iclog->ic_header.h_tail_lsn = cpu_to_be64(log->l_tail_lsn);
2891                xlog_verify_tail_lsn(log, iclog, log->l_tail_lsn);
2892                /* cycle incremented when incrementing curr_block */
2893        }
2894        spin_unlock(&log->l_icloglock);
2895
2896        /*
2897         * We let the log lock go, so it's possible that we hit a log I/O
2898         * error or some other SHUTDOWN condition that marks the iclog
2899         * as XLOG_STATE_IOERROR before the bwrite. However, we know that
2900         * this iclog has consistent data, so we ignore IOERROR
2901         * flags after this point.
2902         */
2903        if (sync)
2904                return xlog_sync(log, iclog);
Show full sources