Showing error 1110

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

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
2577        free_bytes = xlog_space_left(log, log->l_grant_reserve_cycle,
2578                                     log->l_grant_reserve_bytes);
2579        if (free_bytes < need_bytes) {
2580                if ((tic->t_flags & XLOG_TIC_IN_Q) == 0)
2581                        xlog_ins_ticketq(&log->l_reserve_headq, tic);
2582                xlog_trace_loggrant(log, tic,
2583                                    "xlog_grant_log_space: sleep 2");
2584                XFS_STATS_INC(xs_sleep_logspace);
2585                sv_wait(&tic->t_wait, PINOD|PLTWAIT, &log->l_grant_lock, s);
2586
2587                if (XLOG_FORCED_SHUTDOWN(log)) {
2588                        spin_lock(&log->l_grant_lock);
2589                        goto error_return;
2590                }
2591
2592                xlog_trace_loggrant(log, tic,
2593                                    "xlog_grant_log_space: wake 2");
2594                xlog_grant_push_ail(log->l_mp, need_bytes);
2595                spin_lock(&log->l_grant_lock);
2596                goto redo;
2597        } else if (tic->t_flags & XLOG_TIC_IN_Q)
2598                xlog_del_ticketq(&log->l_reserve_headq, tic);
2599
2600        /* we've got enough space */
2601        xlog_grant_add_space(log, need_bytes);
2602#ifdef DEBUG
2603        tail_lsn = log->l_tail_lsn;
2604        /*
2605         * Check to make sure the grant write head didn't just over lap the
Show full sources