Showing error 1022

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/jbd/checkpoint.c
Line in file: 173
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-03-04 17:07:06 UTC


Source:

143                if (space_left < nblocks) {
144                        int chkpt = journal->j_checkpoint_transactions != NULL;
145                        tid_t tid = 0;
146
147                        if (journal->j_committing_transaction)
148                                tid = journal->j_committing_transaction->t_tid;
149                        spin_unlock(&journal->j_list_lock);
150                        spin_unlock(&journal->j_state_lock);
151                        if (chkpt) {
152                                log_do_checkpoint(journal);
153                        } else if (cleanup_journal_tail(journal) == 0) {
154                                /* We were able to recover space; yay! */
155                                ;
156                        } else if (tid) {
157                                log_wait_commit(journal, tid);
158                        } else {
159                                printk(KERN_ERR "%s: needed %d blocks and "
160                                       "only had %d space available\n",
161                                       __func__, nblocks, space_left);
162                                printk(KERN_ERR "%s: no way to get more "
163                                       "journal space\n", __func__);
164                                WARN_ON(1);
165                                journal_abort(journal, 0);
166                        }
167                        spin_lock(&journal->j_state_lock);
168                } else {
169                        spin_unlock(&journal->j_list_lock);
170                }
171                mutex_unlock(&journal->j_checkpoint_mutex);
172        }
173}
174
175/*
176 * We were unable to perform jbd_trylock_bh_state() inside j_list_lock.
177 * The caller must restart a list walk.  Wait for someone else to run
178 * jbd_unlock_bh_state().
179 */
180static void jbd_sync_bh(journal_t *journal, struct buffer_head *bh)
181        __releases(journal->j_list_lock)
182{
183        get_bh(bh);
Show full sources