27
27
*
28
28
* Called with j_list_lock held.
29
29
*/
30
- static inline void __buffer_unlink_first (struct journal_head * jh )
30
+ static inline void __buffer_unlink (struct journal_head * jh )
31
31
{
32
32
transaction_t * transaction = jh -> b_cp_transaction ;
33
33
@@ -40,23 +40,6 @@ static inline void __buffer_unlink_first(struct journal_head *jh)
40
40
}
41
41
}
42
42
43
- /*
44
- * Unlink a buffer from a transaction checkpoint(io) list.
45
- *
46
- * Called with j_list_lock held.
47
- */
48
- static inline void __buffer_unlink (struct journal_head * jh )
49
- {
50
- transaction_t * transaction = jh -> b_cp_transaction ;
51
-
52
- __buffer_unlink_first (jh );
53
- if (transaction -> t_checkpoint_io_list == jh ) {
54
- transaction -> t_checkpoint_io_list = jh -> b_cpnext ;
55
- if (transaction -> t_checkpoint_io_list == jh )
56
- transaction -> t_checkpoint_io_list = NULL ;
57
- }
58
- }
59
-
60
43
/*
61
44
* Check a checkpoint buffer could be release or not.
62
45
*
@@ -503,15 +486,6 @@ unsigned long jbd2_journal_shrink_checkpoint_list(journal_t *journal,
503
486
break ;
504
487
if (need_resched () || spin_needbreak (& journal -> j_list_lock ))
505
488
break ;
506
- if (released )
507
- continue ;
508
-
509
- nr_freed += journal_shrink_one_cp_list (transaction -> t_checkpoint_io_list ,
510
- nr_to_scan , & released );
511
- if (* nr_to_scan == 0 )
512
- break ;
513
- if (need_resched () || spin_needbreak (& journal -> j_list_lock ))
514
- break ;
515
489
} while (transaction != last_transaction );
516
490
517
491
if (transaction != last_transaction ) {
@@ -566,17 +540,6 @@ void __jbd2_journal_clean_checkpoint_list(journal_t *journal, bool destroy)
566
540
*/
567
541
if (need_resched ())
568
542
return ;
569
- if (ret )
570
- continue ;
571
- /*
572
- * It is essential that we are as careful as in the case of
573
- * t_checkpoint_list with removing the buffer from the list as
574
- * we can possibly see not yet submitted buffers on io_list
575
- */
576
- ret = journal_clean_one_cp_list (transaction ->
577
- t_checkpoint_io_list , destroy );
578
- if (need_resched ())
579
- return ;
580
543
/*
581
544
* Stop scanning if we couldn't free the transaction. This
582
545
* avoids pointless scanning of transactions which still
@@ -661,7 +624,7 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh)
661
624
jbd2_journal_put_journal_head (jh );
662
625
663
626
/* Is this transaction empty? */
664
- if (transaction -> t_checkpoint_list || transaction -> t_checkpoint_io_list )
627
+ if (transaction -> t_checkpoint_list )
665
628
return 0 ;
666
629
667
630
/*
@@ -753,7 +716,6 @@ void __jbd2_journal_drop_transaction(journal_t *journal, transaction_t *transact
753
716
J_ASSERT (transaction -> t_forget == NULL );
754
717
J_ASSERT (transaction -> t_shadow_list == NULL );
755
718
J_ASSERT (transaction -> t_checkpoint_list == NULL );
756
- J_ASSERT (transaction -> t_checkpoint_io_list == NULL );
757
719
J_ASSERT (atomic_read (& transaction -> t_updates ) == 0 );
758
720
J_ASSERT (journal -> j_committing_transaction != transaction );
759
721
J_ASSERT (journal -> j_running_transaction != transaction );
0 commit comments