diff options
author | Salvatore Bonaccorso <carnil@debian.org> | 2019-12-18 18:06:31 +0100 |
---|---|---|
committer | Salvatore Bonaccorso <carnil@debian.org> | 2019-12-18 22:50:21 +0100 |
commit | 102987a83771aa994821d4d982d06faa64c789e4 (patch) | |
tree | 3e5ab5206886ec297a1a97ce80f504d75468ed2f /debian/patches-rt/0005-jbd2-Don-t-call-__bforget-unnecessarily.patch | |
parent | 479cb120ecb2b3f2c4d929a7b57860248d6f79bd (diff) | |
download | linux-debian-102987a83771aa994821d4d982d06faa64c789e4.tar.gz |
[rt] Update to 5.4.3-rt1 and re-enable
Adjust for context changes due to backport of
e66b39af00f4 ("workqueue: Fix pwq ref leak in rescuer_thread()") and
def98c84b6cd ("workqueue: Fix spurious sanity check failures in
destroy_workqueue()") in 5.4.4.
Diffstat (limited to 'debian/patches-rt/0005-jbd2-Don-t-call-__bforget-unnecessarily.patch')
-rw-r--r-- | debian/patches-rt/0005-jbd2-Don-t-call-__bforget-unnecessarily.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/debian/patches-rt/0005-jbd2-Don-t-call-__bforget-unnecessarily.patch b/debian/patches-rt/0005-jbd2-Don-t-call-__bforget-unnecessarily.patch new file mode 100644 index 000000000..ebd16e255 --- /dev/null +++ b/debian/patches-rt/0005-jbd2-Don-t-call-__bforget-unnecessarily.patch @@ -0,0 +1,59 @@ +From: Jan Kara <jack@suse.cz> +Date: Fri, 9 Aug 2019 14:42:31 +0200 +Subject: [PATCH 5/7] jbd2: Don't call __bforget() unnecessarily +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz + +jbd2_journal_forget() jumps to 'not_jbd' branch which calls __bforget() +in cases where the buffer is clean which is pointless. In case of failed +assertion, it can be even argued that it is safer not to touch buffer's +dirty bits. Also logically it makes more sense to just jump to 'drop' +and that will make logic also simpler when we switch bh_state_lock to a +spinlock. + +Signed-off-by: Jan Kara <jack@suse.cz> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + fs/jbd2/transaction.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +--- a/fs/jbd2/transaction.c ++++ b/fs/jbd2/transaction.c +@@ -1550,7 +1550,7 @@ int jbd2_journal_forget (handle_t *handl + if (!J_EXPECT_JH(jh, !jh->b_committed_data, + "inconsistent data on disk")) { + err = -EIO; +- goto not_jbd; ++ goto drop; + } + + /* keep track of whether or not this transaction modified us */ +@@ -1640,7 +1640,7 @@ int jbd2_journal_forget (handle_t *handl + if (!jh->b_cp_transaction) { + JBUFFER_TRACE(jh, "belongs to none transaction"); + spin_unlock(&journal->j_list_lock); +- goto not_jbd; ++ goto drop; + } + + /* +@@ -1650,7 +1650,7 @@ int jbd2_journal_forget (handle_t *handl + if (!buffer_dirty(bh)) { + __jbd2_journal_remove_checkpoint(jh); + spin_unlock(&journal->j_list_lock); +- goto not_jbd; ++ goto drop; + } + + /* +@@ -1663,10 +1663,9 @@ int jbd2_journal_forget (handle_t *handl + __jbd2_journal_file_buffer(jh, transaction, BJ_Forget); + spin_unlock(&journal->j_list_lock); + } +- ++drop: + jbd_unlock_bh_state(bh); + __brelse(bh); +-drop: + if (drop_reserve) { + /* no need to reserve log space for this block -bzzz */ + handle->h_buffer_credits++; |