Patch "jbd2: fix checkpoint list cleanup" has been added to the 4.3-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
jbd2: fix checkpoint list cleanup
to the 4.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
jbd2-fix-checkpoint-list-cleanup.patch
and it can be found in the queue-4.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
33d14975e5ac469963d5d63856b61698ad0bff07Mon Sep 17 00:00:00 2001
From: Jan Kara <[email protected]>
Date: Sat, 17 Oct 2015 22:35:09 -0400
Subject: jbd2: fix checkpoint list cleanup
From: Jan Kara <[email protected]>
commit 33d14975e5ac469963d5d63856b61698ad0bff07 upstream.
Unlike comments and expectation of callers journal_clean_one_cp_list() returned 1 not only if it freed the transaction but also if it freed some buffers in the transaction. That could make __jbd2_journal_clean_checkpoint_list() skip processing t_checkpoint_io_list and continue with processing the next transaction. This is mostly a cosmetic issue since the only result is we can sometimes free less memory than we could. But it's still worth fixing. Fix journal_clean_one_cp_list() to return 1 only if the transaction was really freed.
--- fs/jbd2/checkpoint.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
fs/jbd2/checkpoint.c +3 -5
@@ -427,7 +427,6 @@ static int journal_clean_one_cp_list(strstruct journal_head *last_jh;struct journal_head *next_jh = jh;int ret; -int freed =0 ;if (!jh)return 0 ;
@@ -441,10 +440,9 @@ static int journal_clean_one_cp_list(strelse ret =__jbd2_journal_remove_checkpoint (jh) +1 ;if (!ret) -return freed; +return 0 ;if (ret ==2 )return 1 ; - freed =1 ;/* * This function only frees up some memory * if possible so we dont have an obligation
@@ -452,10 +450,10 @@ static int journal_clean_one_cp_list(str* requested: */ if (need_resched ()) -return freed; +return 0 ; }while (jh != last_jh); -return freed; +return 0 ; }/*
Patches currently in stable-queue which might be from [email protected] are
queue-4.3/jbd2-fix-checkpoint-list-cleanup.patch