Showing error 616

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: fs/jbd/checkpoint.c
Line in file: 225
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:57 UTC


Source:

195 *
196 * Return 0 on success, and return <0 if some buffers have failed
197 * to be written out.
198 *
199 * Called with j_list_lock held.
200 */
201static int __wait_cp_io(journal_t *journal, transaction_t *transaction)
202{
203        struct journal_head *jh;
204        struct buffer_head *bh;
205        tid_t this_tid;
206        int released = 0;
207        int ret = 0;
208
209        this_tid = transaction->t_tid;
210restart:
211        /* Did somebody clean up the transaction in the meanwhile? */
212        if (journal->j_checkpoint_transactions != transaction ||
213                        transaction->t_tid != this_tid)
214                return ret;
215        while (!released && transaction->t_checkpoint_io_list) {
216                jh = transaction->t_checkpoint_io_list;
217                bh = jh2bh(jh);
218                if (!jbd_trylock_bh_state(bh)) {
219                        jbd_sync_bh(journal, bh);
220                        spin_lock(&journal->j_list_lock);
221                        goto restart;
222                }
223                if (buffer_locked(bh)) {
224                        atomic_inc(&bh->b_count);
225                        spin_unlock(&journal->j_list_lock);
226                        jbd_unlock_bh_state(bh);
227                        wait_on_buffer(bh);
228                        /* the journal_head may have gone by now */
229                        BUFFER_TRACE(bh, "brelse");
230                        __brelse(bh);
231                        spin_lock(&journal->j_list_lock);
232                        goto restart;
233                }
234                if (unlikely(buffer_write_io_error(bh)))
235                        ret = -EIO;
Show full sources