Showing error 1108

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: 2566
Project: Linux Kernel
Project version: 2.6.28
Tools: Clang Static Analyzer (3.0)
Smatch (1.59)
Entered: 2012-04-17 12:29:30 UTC


Source:

2536
2537#ifdef DEBUG
2538        if (log->l_flags & XLOG_ACTIVE_RECOVERY)
2539                panic("grant Recovery problem");
2540#endif
2541
2542        /* Is there space or do we need to sleep? */
2543        spin_lock(&log->l_grant_lock);
2544        xlog_trace_loggrant(log, tic, "xlog_grant_log_space: enter");
2545
2546        /* something is already sleeping; insert new transaction at end */
2547        if (log->l_reserve_headq) {
2548                xlog_ins_ticketq(&log->l_reserve_headq, tic);
2549                xlog_trace_loggrant(log, tic,
2550                                    "xlog_grant_log_space: sleep 1");
2551                /*
2552                 * Gotta check this before going to sleep, while we're
2553                 * holding the grant lock.
2554                 */
2555                if (XLOG_FORCED_SHUTDOWN(log))
2556                        goto error_return;
2557
2558                XFS_STATS_INC(xs_sleep_logspace);
2559                sv_wait(&tic->t_wait, PINOD|PLTWAIT, &log->l_grant_lock, s);
2560                /*
2561                 * If we got an error, and the filesystem is shutting down,
2562                 * we'll catch it down below. So just continue...
2563                 */
2564                xlog_trace_loggrant(log, tic,
2565                                    "xlog_grant_log_space: wake 1");
2566                spin_lock(&log->l_grant_lock);
2567        }
2568        if (tic->t_flags & XFS_LOG_PERM_RESERV)
2569                need_bytes = tic->t_unit_res*tic->t_ocnt;
2570        else
2571                need_bytes = tic->t_unit_res;
2572
2573redo:
2574        if (XLOG_FORCED_SHUTDOWN(log))
2575                goto error_return;
2576
Show full sources