Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cba44359 authored by Marcin Slusarz's avatar Marcin Slusarz Committed by Linus Torvalds
Browse files

udf: fix udf_add_free_space



In commit 742ba02a (udf: create common
function for changing free space counter) by accident I reversed safety
condition which lead to null pointer dereference in case of media error and
wrong counting of free space in normal situation

Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Acked-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e28d80f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ static bool udf_add_free_space(struct udf_sb_info *sbi,
{
	struct logicalVolIntegrityDesc *lvid;

	if (sbi->s_lvid_bh)
	if (sbi->s_lvid_bh == NULL)
		return false;

	lvid = (struct logicalVolIntegrityDesc *)sbi->s_lvid_bh->b_data;