]> git.baikalelectronics.ru Git - kernel.git/commit
ubifs: Fix data node size for truncating uncompressed nodes
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Wed, 17 May 2017 08:36:45 +0000 (10:36 +0200)
committerRichard Weinberger <richard@nod.at>
Fri, 14 Jul 2017 20:49:06 +0000 (22:49 +0200)
commit482eeb60e27f324819ece3d61a633f35fb067d14
treedc30367f55104dfd9ac7989dda1ec8cbeae630e8
parent878cf0e2ab7aa2805869513946c6ca1060f9f5c9
ubifs: Fix data node size for truncating uncompressed nodes

Currently, the function truncate_data_node only updates the
destination data node size if compression is used. For
uncompressed nodes, the old length is incorrectly retained.

This patch makes sure that the length is correctly set when
compression is disabled.

Fixes: 8438355b9c39 ("ubifs: Implement encrypt/decrypt for all IO")
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/journal.c