From ba712624d6a0df121d5dfc5440ba83cf53224916 Mon Sep 17 00:00:00 2001 From: luozhengzheng Date: Fri, 2 Dec 2016 07:45:16 +0800 Subject: Fix incorrect operator in abd_alloc_sametype() This should be & and not | so is_metadata is set correctly. Reviewed-by: Dan Kimmel Reviewed-by: Brian Behlendorf Signed-off-by: luozhengzheng Closes #5438 --- module/zfs/abd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/zfs') diff --git a/module/zfs/abd.c b/module/zfs/abd.c index ffee9a5f8..d14564b33 100644 --- a/module/zfs/abd.c +++ b/module/zfs/abd.c @@ -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 { -- cgit v1.2.3