]> git.baikalelectronics.ru Git - kernel.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)
committerRichard Weinberger <richard@nod.at>
Tue, 29 Sep 2020 08:43:05 +0000 (10:43 +0200)
commit523bab34b5dadc88a920cf31b88adb271d62cb39
tree3fb96e41c5899e06079853c01a08bafb463cba86
parentf332db0d5a249f05ef11ee0a5892095095c6d59b
ubifs: journal: Make sure to not dirty twice for auth nodes

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: 1a178ff060c7 ("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>
fs/ubifs/journal.c