Showing error 1341

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: fs/dlm/lock.c
Line in file: 940
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 910        if (!lkb->lkb_wait_count)
 911                list_del_init(&lkb->lkb_wait_reply);
 912        unhold_lkb(lkb);
 913        return 0;
 914}
 915
 916static int remove_from_waiters(struct dlm_lkb *lkb, int mstype)
 917{
 918        struct dlm_ls *ls = lkb->lkb_resource->res_ls;
 919        int error;
 920
 921        mutex_lock(&ls->ls_waiters_mutex);
 922        error = _remove_from_waiters(lkb, mstype);
 923        mutex_unlock(&ls->ls_waiters_mutex);
 924        return error;
 925}
 926
 927/* Handles situations where we might be processing a "fake" or "stub" reply in
 928   which we can't try to take waiters_mutex again. */
 929
 930static int remove_from_waiters_ms(struct dlm_lkb *lkb, struct dlm_message *ms)
 931{
 932        struct dlm_ls *ls = lkb->lkb_resource->res_ls;
 933        int error;
 934
 935        if (ms != &ls->ls_stub_ms)
 936                mutex_lock(&ls->ls_waiters_mutex);
 937        error = _remove_from_waiters(lkb, ms->m_type);
 938        if (ms != &ls->ls_stub_ms)
 939                mutex_unlock(&ls->ls_waiters_mutex);
 940        return error;
 941}
 942
 943static void dir_remove(struct dlm_rsb *r)
 944{
 945        int to_nodeid;
 946
 947        if (dlm_no_directory(r->res_ls))
 948                return;
 949
 950        to_nodeid = dlm_dir_nodeid(r);
Show full sources