mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
udf: fix udf_add_free_space
In commit 742ba02a51
(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: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e28d80f182
commit
cba44359d1
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue