udf: Fix free space reporting for metadata and virtual partitions
authorJan Kara <jack@suse.cz>
Tue, 7 Jan 2020 15:36:49 +0000 (16:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:34:45 +0000 (08:34 +0100)
commit53e47add44ca16584a33380777c5ed3347d5bde2
treea8c1f5dbe3c6aafd44e9a6f1c09326dba6d89ec4
parentb957a310c92b33d6a3ccb3cc43f6b48fb592324e
udf: Fix free space reporting for metadata and virtual partitions

[ Upstream commit a4a8b99ec819ca60b49dc582a4287ef03411f117 ]

Free space on filesystems with metadata or virtual partition maps
currently gets misreported. This is because these partitions are just
remapped onto underlying real partitions from which keep track of free
blocks. Take this remapping into account when counting free blocks as
well.

Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
Reported-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/udf/super.c