Showing error 582

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: fs/jbd2/checkpoint.c
Line in file: 426
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:

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