Showing error 578

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: fs/jbd/checkpoint.c
Line in file: 416
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Clang Static Analyzer (3.0)
Smatch (1.59)
Entered: 2011-11-07 22:19:59 UTC


Source:

386                while (!retry && transaction->t_checkpoint_list) {
387                        struct buffer_head *bh;
388
389                        jh = transaction->t_checkpoint_list;
390                        bh = jh2bh(jh);
391                        if (!jbd_trylock_bh_state(bh)) {
392                                jbd_sync_bh(journal, bh);
393                                retry = 1;
394                                break;
395                        }
396                        retry = __process_buffer(journal, jh, bhs,&batch_count);
397                        if (retry < 0 && !result)
398                                result = retry;
399                        if (!retry && (need_resched() ||
400                                spin_needbreak(&journal->j_list_lock))) {
401                                spin_unlock(&journal->j_list_lock);
402                                retry = 1;
403                                break;
404                        }
405                }
406
407                if (batch_count) {
408                        if (!retry) {
409                                spin_unlock(&journal->j_list_lock);
410                                retry = 1;
411                        }
412                        __flush_batch(journal, bhs, &batch_count);
413                }
414
415                if (retry) {
416                        spin_lock(&journal->j_list_lock);
417                        goto restart;
418                }
419                /*
420                 * Now we have cleaned up the first transaction's checkpoint
421                 * list. Let's clean up the second one
422                 */
423                err = __wait_cp_io(journal, transaction);
424                if (!result)
425                        result = err;
426        }
Show full sources