btrfs: avoid NULL deref in btrfs_reserve_extent with DEBUG_ENOSPC
__find_space_info can return NULL but we don't check it before calling dump_space_info(). Signed-off-by: Jeff Mahoney <jeffm@suse.com>
This commit is contained in:
parent
d5c13f927f
commit
538042801a
|
@ -5838,6 +5838,7 @@ again:
|
||||||
printk(KERN_ERR "btrfs allocation failed flags %llu, "
|
printk(KERN_ERR "btrfs allocation failed flags %llu, "
|
||||||
"wanted %llu\n", (unsigned long long)data,
|
"wanted %llu\n", (unsigned long long)data,
|
||||||
(unsigned long long)num_bytes);
|
(unsigned long long)num_bytes);
|
||||||
|
if (sinfo)
|
||||||
dump_space_info(sinfo, num_bytes, 1);
|
dump_space_info(sinfo, num_bytes, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue