Fix incorrect operator in abd_alloc_sametype()

This should be & and not | so is_metadata is set correctly.

Reviewed-by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn>
Closes #5438
This commit is contained in:
luozhengzheng 2016-12-02 07:45:16 +08:00 committed by Brian Behlendorf
parent e2c7d3785a
commit ba712624d6

View File

@ -695,7 +695,7 @@ abd_free(abd_t *abd)
abd_t *
abd_alloc_sametype(abd_t *sabd, size_t size)
{
boolean_t is_metadata = (sabd->abd_flags | ABD_FLAG_META) != 0;
boolean_t is_metadata = (sabd->abd_flags & ABD_FLAG_META) != 0;
if (abd_is_linear(sabd)) {
return (abd_alloc_linear(size, is_metadata));
} else {