2727 *
2828 * Called with j_list_lock held.
2929 */
30- static inline void __buffer_unlink_first (struct journal_head * jh )
30+ static inline void __buffer_unlink (struct journal_head * jh )
3131{
3232 transaction_t * transaction = jh -> b_cp_transaction ;
3333
@@ -40,23 +40,6 @@ static inline void __buffer_unlink_first(struct journal_head *jh)
4040 }
4141}
4242
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-
6043/*
6144 * Check a checkpoint buffer could be release or not.
6245 *
@@ -503,15 +486,6 @@ unsigned long jbd2_journal_shrink_checkpoint_list(journal_t *journal,
503486 break ;
504487 if (need_resched () || spin_needbreak (& journal -> j_list_lock ))
505488 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 ;
515489 } while (transaction != last_transaction );
516490
517491 if (transaction != last_transaction ) {
@@ -566,17 +540,6 @@ void __jbd2_journal_clean_checkpoint_list(journal_t *journal, bool destroy)
566540 */
567541 if (need_resched ())
568542 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 ;
580543 /*
581544 * Stop scanning if we couldn't free the transaction. This
582545 * avoids pointless scanning of transactions which still
@@ -661,7 +624,7 @@ int __jbd2_journal_remove_checkpoint(struct journal_head *jh)
661624 jbd2_journal_put_journal_head (jh );
662625
663626 /* Is this transaction empty? */
664- if (transaction -> t_checkpoint_list || transaction -> t_checkpoint_io_list )
627+ if (transaction -> t_checkpoint_list )
665628 return 0 ;
666629
667630 /*
@@ -753,7 +716,6 @@ void __jbd2_journal_drop_transaction(journal_t *journal, transaction_t *transact
753716 J_ASSERT (transaction -> t_forget == NULL );
754717 J_ASSERT (transaction -> t_shadow_list == NULL );
755718 J_ASSERT (transaction -> t_checkpoint_list == NULL );
756- J_ASSERT (transaction -> t_checkpoint_io_list == NULL );
757719 J_ASSERT (atomic_read (& transaction -> t_updates ) == 0 );
758720 J_ASSERT (journal -> j_committing_transaction != transaction );
759721 J_ASSERT (journal -> j_running_transaction != transaction );
0 commit comments