]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ubifs: journal: Make sure to not dirty twice for auth nodes
authorRichard Weinberger <richard@nod.at>
Mon, 28 Sep 2020 18:58:59 +0000 (20:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:51:47 +0000 (11:51 +0100)
commit10185cbb57f93e2b231936c8b30095ffd25b51b6
treef1c1c77a4fd3e2550a5a6400f355e4922d4f32b1
parentae623c57f2c9683f403ed7e069f5d2e3da604d4b
ubifs: journal: Make sure to not dirty twice for auth nodes

commit 78c7d49f55d8631b67c09f9bfbe8155211a9ea06 upstream.

When removing the last reference of an inode the size of an auth node
is already part of write_len. So we must not call ubifs_add_auth_dirt().
Call it only when needed.

Cc: <stable@vger.kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Kristof Havasi <havasiefr@gmail.com>
Fixes: 6a98bc4614de ("ubifs: Add authentication nodes to journal")
Reported-and-tested-by: Kristof Havasi <havasiefr@gmail.com>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ubifs/journal.c