Jan Kara 3fdf975173 udf: Restore i_lenAlloc when inode expansion fails
commit ea8569194b43f0f01f0a84c689388542c7254a1f upstream.

When we fail to expand inode from inline format to a normal format, we
restore inode to contain the original inline formatting but we forgot to
set i_lenAlloc back. The mismatch between i_lenAlloc and i_size was then
causing further problems such as warnings and lost data down the line.

Reported-by: butt3rflyh4ck <butterflyhuangxx@gmail.com>
CC: stable@vger.kernel.org
Fixes: 7e49b6f2480c ("udf: Convert UDF to new truncate calling sequence")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 18:16:24 +01:00
..
2020-11-05 11:07:03 +01:00
2020-04-02 16:34:33 +02:00
2019-08-06 19:05:23 +02:00
2022-01-27 09:01:02 +01:00
2021-11-26 11:40:32 +01:00
2021-06-30 08:48:55 -04:00
2018-12-21 14:13:04 +01:00
2020-03-11 18:02:43 +01:00
2020-04-02 16:34:21 +02:00
2021-12-14 10:16:55 +01:00