提交 53804280 编写于 作者: J Jeff Mahoney 提交者: David Sterba

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: NJeff Mahoney <jeffm@suse.com>
上级 d5c13f92
......@@ -5838,7 +5838,8 @@ int btrfs_reserve_extent(struct btrfs_trans_handle *trans,
printk(KERN_ERR "btrfs allocation failed flags %llu, "
"wanted %llu\n", (unsigned long long)data,
(unsigned long long)num_bytes);
dump_space_info(sinfo, num_bytes, 1);
if (sinfo)
dump_space_info(sinfo, num_bytes, 1);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册