Showing error 618

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


Source:

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