Showing error 1112

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: 2708
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:

2678                do {
2679                        ASSERT(ntic->t_flags & XLOG_TIC_PERM_RESERV);
2680
2681                        if (free_bytes < ntic->t_unit_res)
2682                                break;
2683                        free_bytes -= ntic->t_unit_res;
2684                        sv_signal(&ntic->t_wait);
2685                        ntic = ntic->t_next;
2686                } while (ntic != log->l_write_headq);
2687
2688                if (ntic != log->l_write_headq) {
2689                        if ((tic->t_flags & XLOG_TIC_IN_Q) == 0)
2690                                xlog_ins_ticketq(&log->l_write_headq, tic);
2691
2692                        xlog_trace_loggrant(log, tic,
2693                                    "xlog_regrant_write_log_space: sleep 1");
2694                        XFS_STATS_INC(xs_sleep_logspace);
2695                        sv_wait(&tic->t_wait, PINOD|PLTWAIT,
2696                                &log->l_grant_lock, s);
2697
2698                        /* If we're shutting down, this tic is already
2699                         * off the queue */
2700                        if (XLOG_FORCED_SHUTDOWN(log)) {
2701                                spin_lock(&log->l_grant_lock);
2702                                goto error_return;
2703                        }
2704
2705                        xlog_trace_loggrant(log, tic,
2706                                    "xlog_regrant_write_log_space: wake 1");
2707                        xlog_grant_push_ail(log->l_mp, tic->t_unit_res);
2708                        spin_lock(&log->l_grant_lock);
2709                }
2710        }
2711
2712        need_bytes = tic->t_unit_res;
2713
2714redo:
2715        if (XLOG_FORCED_SHUTDOWN(log))
2716                goto error_return;
2717
2718        free_bytes = xlog_space_left(log, log->l_grant_write_cycle,
Show full sources