From nobody Mon Feb 9 00:30:14 2026 Received: from sender3-pp-f112.zoho.com (sender3-pp-f112.zoho.com [136.143.184.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FD5E2D0611 for ; Thu, 30 Oct 2025 12:35:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.184.112 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761827755; cv=pass; b=r+ExAyYbufokQaT8PoJ1ZHRYAGwgMZwZuVFJEYH4EbxbVYIb1Y09T/yqNxXDxfaTtzIE3nFu+Iaj9FSI2lOCHeXNYeL3TmC1Pcbn+diNB1ShXloaYxlUawCgAwcybDlivG0++twdHkdJk23fGilNLKlIPwA3VYLRtEr/RlhIOn0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761827755; c=relaxed/simple; bh=R/TbI84eFp9kXjDw88iosgHhX0aGRc0fsZmAH+tj+3k=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=T9vuBAHNcAq5yiJm+eRoidnDQ4Cpy3LECKvawEIXgeDamNc5VQggPCVNzc1FN7obOP87IvB6fBZx1bboAKZ1CMluo1l8J0mTYwy3qp+8bPk9LdS5iGUs7wlQkHBcfixMWOTFMqurfkFasURY6OWirDwaFKIY80+w063cEvTSVew= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty; spf=pass smtp.mailfrom=linux.beauty; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b=lbatI+8N; arc=pass smtp.client-ip=136.143.184.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.beauty Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b="lbatI+8N" ARC-Seal: i=1; a=rsa-sha256; t=1761827617; cv=none; d=zohomail.com; s=zohoarc; b=jW2fwMCzE09dfCy78b4g11QE/M49jSAIXE+Y9Sff7O+1FrIrH8NVbainb1vE3/k4holpmeQvYzQREbmsHWAH2fHOsyqPDcIbYa6rNW0ttgnFrmNAYBCCYbBuKuHn2ie9OP4f//4BSxPx4wHFIWDVIWKHfsCRhAy9Xkt5HGAJ7eM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761827617; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=bL264gMYmKx98ivmk0jTfYv5p7G6wPZT+qugzMLjMzI=; b=h+TE7ouf89pWxrWeDiEwoojWtc5WshKXB2X5lht74sFXzxc+0yYQyuhiRSNY9g8AGKmtFdTeobrzD5MYCU3RyV94GgJdA8g2A351C0rdsrpWBTdxF2aozJRDaaVI2p75ciYifStTl5WnBfbOzPBnzjpTDau/RmjA3fB63hlLfLc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=linux.beauty; spf=pass smtp.mailfrom=me@linux.beauty; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1761827617; s=zmail; d=linux.beauty; i=me@linux.beauty; h=From:From:To:To:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=bL264gMYmKx98ivmk0jTfYv5p7G6wPZT+qugzMLjMzI=; b=lbatI+8NOTCQd+b9qJcK7AzbijJiNb5/6tUejmud+25uJYqSfmSBGd7mhqW2Jk3v iL7RLZk5KZcgU6F8r3n/7QLVZPNiJ9BXe7P1fEHv6NGsDztNbma/wISi8Vp9Fwerzdp 8aVQ8z1DI9In6pzXj8DoB024XBo4jySt/cpnh68Q= Received: by mx.zohomail.com with SMTPS id 1761827614963359.7467821678007; Thu, 30 Oct 2025 05:33:34 -0700 (PDT) From: Li Chen To: dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org, Dongsheng Yang , Zheng Gu Subject: [PATCH 1/3] dm-pcache: allow built-in build and rename flush helper Date: Thu, 30 Oct 2025 20:33:19 +0800 Message-ID: <20251030123323.967081-2-me@linux.beauty> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251030123323.967081-1-me@linux.beauty> References: <20251030123323.967081-1-me@linux.beauty> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" From: Li Chen CONFIG_BCACHE is tristate, so dm-pcache can also be built-in. Switch the Makefile to use obj-$(CONFIG_DM_PCACHE) so the target can be linked into vmlinux instead of always being a loadable module. Also rename cache_flush() to pcache_cache_flush() to avoid a global symbol clash with sunrpc/cache.c's cache_flush(). Signed-off-by: Li Chen --- drivers/md/dm-pcache/Makefile | 2 +- drivers/md/dm-pcache/cache.c | 2 +- drivers/md/dm-pcache/cache.h | 2 +- drivers/md/dm-pcache/cache_req.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/md/dm-pcache/Makefile b/drivers/md/dm-pcache/Makefile index 86776e4acad24..cedfd38854f63 100644 --- a/drivers/md/dm-pcache/Makefile +++ b/drivers/md/dm-pcache/Makefile @@ -1,3 +1,3 @@ dm-pcache-y :=3D dm_pcache.o cache_dev.o segment.o backing_dev.o cache.o c= ache_gc.o cache_writeback.o cache_segment.o cache_key.o cache_req.o =20 -obj-m +=3D dm-pcache.o +obj-$(CONFIG_DM_PCACHE) +=3D dm-pcache.o diff --git a/drivers/md/dm-pcache/cache.c b/drivers/md/dm-pcache/cache.c index d8e92367d9470..d516d49042272 100644 --- a/drivers/md/dm-pcache/cache.c +++ b/drivers/md/dm-pcache/cache.c @@ -411,7 +411,7 @@ void pcache_cache_stop(struct dm_pcache *pcache) { struct pcache_cache *cache =3D &pcache->cache; =20 - cache_flush(cache); + pcache_cache_flush(cache); =20 cancel_delayed_work_sync(&cache->gc_work); flush_work(&cache->clean_work); diff --git a/drivers/md/dm-pcache/cache.h b/drivers/md/dm-pcache/cache.h index 1136d86958c8c..27613b56be54c 100644 --- a/drivers/md/dm-pcache/cache.h +++ b/drivers/md/dm-pcache/cache.h @@ -339,7 +339,7 @@ void cache_seg_put(struct pcache_cache_segment *cache_s= eg); void cache_seg_set_next_seg(struct pcache_cache_segment *cache_seg, u32 se= g_id); =20 /* cache request*/ -int cache_flush(struct pcache_cache *cache); +int pcache_cache_flush(struct pcache_cache *cache); void miss_read_end_work_fn(struct work_struct *work); int pcache_cache_handle_req(struct pcache_cache *cache, struct pcache_requ= est *pcache_req); =20 diff --git a/drivers/md/dm-pcache/cache_req.c b/drivers/md/dm-pcache/cache_= req.c index 27f94c1fa968c..7854a30e07b7f 100644 --- a/drivers/md/dm-pcache/cache_req.c +++ b/drivers/md/dm-pcache/cache_req.c @@ -790,7 +790,7 @@ static int cache_write(struct pcache_cache *cache, stru= ct pcache_request *pcache } =20 /** - * cache_flush - Flush all ksets to persist any pending cache data + * pcache_cache_flush - Flush all ksets to persist any pending cache data * @cache: Pointer to the cache structure * * This function iterates through all ksets associated with the provided `= cache` @@ -802,7 +802,7 @@ static int cache_write(struct pcache_cache *cache, stru= ct pcache_request *pcache * the respective error code, preventing the flush operation from proceedi= ng to * subsequent ksets. */ -int cache_flush(struct pcache_cache *cache) +int pcache_cache_flush(struct pcache_cache *cache) { struct pcache_cache_kset *kset; int ret; @@ -827,7 +827,7 @@ int pcache_cache_handle_req(struct pcache_cache *cache,= struct pcache_request *p struct bio *bio =3D pcache_req->bio; =20 if (unlikely(bio->bi_opf & REQ_PREFLUSH)) - return cache_flush(cache); + return pcache_cache_flush(cache); =20 if (bio_data_dir(bio) =3D=3D READ) return cache_read(cache, pcache_req); --=20 2.51.0 From nobody Mon Feb 9 00:30:14 2026 Received: from sender3-pp-f112.zoho.com (sender3-pp-f112.zoho.com [136.143.184.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11234A926 for ; Thu, 30 Oct 2025 12:36:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.184.112 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761827770; cv=pass; b=nf4RPc9XN2tQKt85vfCtS7PiniLFnBQp3QeL/d34JSFwOyuCv4u1RD323CXo8i1xoTK5sTSgNfUL1vgFqlZjUjcApOAPc6NJnt3cgJnGMUy2gwks8fiAwFUz677aBXj2HM1TNDJT2EFvHzZFDIS2m6G0fp1V4p4w+r4dBpUXoAo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761827770; c=relaxed/simple; bh=Pm4gfPGpEvl7urYYvAAc//M9O+0YLVRYbm6O0V4Wi5E=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lupbedXNho3yxsOouA4N0VpR9EWfhds3cwesemjUryNuO6dymRWUOu/RR1b7uBZIYG5oq+FRXoOFUtsMR5qyyIG3DYkQYX5/mucRCkZuPjdMr5GjTkvfPQGY7LI+uqYpCCk9Wz9GZK0KYkzEesATZ1HwrLS6mU5yaAG5bjuaqfM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty; spf=pass smtp.mailfrom=linux.beauty; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b=aC2x86qX; arc=pass smtp.client-ip=136.143.184.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.beauty Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b="aC2x86qX" ARC-Seal: i=1; a=rsa-sha256; t=1761827621; cv=none; d=zohomail.com; s=zohoarc; b=WD6MzwZLw+f1i4E6IGchnSdOtk+am2Sii0xKDNsIARExAr3ZvCG3sDvpqZpfCXHqDMYHasEr0yjexWFCT3YIa7TczkU7WYz0Ko/vUR8KE94dS3BSFRz6iCS2Y0NqEsgsatfm9Z7hRaR1xdRVTa2QDSO5bEsnEmrNF8d9SQxaRtc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761827621; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=LWxPD1jqIGf0eGjGt5kSF5OaU2M0+DsfoZfQTI0FPb0=; b=OqYNl8i4mQXWmzp8BsYYSXofV1VrEK9hRj7ss/Eht2nVfa6Jb4YIi9MowjxzAXl/Ecxcle5ZzYumLmgGGHesepPjrOag0QsR9y6dlYm6bRT5mqqZ+d/3kIwydrDt8dhI2j+etJHYBWC5qZBhRRrUACrvNrubVKwISg4jFIFQJNw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=linux.beauty; spf=pass smtp.mailfrom=me@linux.beauty; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1761827621; s=zmail; d=linux.beauty; i=me@linux.beauty; h=From:From:To:To:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=LWxPD1jqIGf0eGjGt5kSF5OaU2M0+DsfoZfQTI0FPb0=; b=aC2x86qXNi1GODrvOiiJ5+MPt731zhANJjxBf2b1FV6BxD2fIMvkBLgeWNS3Szsb sh77LwFbJpm8ePijkd+owC5a+Yef9Gtq1X/EdFvLHdogTqse45OaR6fxOUNhjqhvyhr O/ZeG32tT2pN4SRtf97VqcLki4hj5PG2LT7tqZnE= Received: by mx.zohomail.com with SMTPS id 1761827618663161.67818038594123; Thu, 30 Oct 2025 05:33:38 -0700 (PDT) From: Li Chen To: dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org, Dongsheng Yang , Zheng Gu Subject: [PATCH 2/3] dm-pcache: reuse meta_addr in pcache_meta_find_latest Date: Thu, 30 Oct 2025 20:33:20 +0800 Message-ID: <20251030123323.967081-3-me@linux.beauty> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251030123323.967081-1-me@linux.beauty> References: <20251030123323.967081-1-me@linux.beauty> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" From: Li Chen pcache_meta_find_latest() already computes the metadata address as meta_addr. Reuse that instead of recomputing. Signed-off-by: Li Chen --- drivers/md/dm-pcache/pcache_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-pcache/pcache_internal.h b/drivers/md/dm-pcache/= pcache_internal.h index d427e534727ce..b7a3319d2bd3e 100644 --- a/drivers/md/dm-pcache/pcache_internal.h +++ b/drivers/md/dm-pcache/pcache_internal.h @@ -99,7 +99,7 @@ static inline void __must_check *pcache_meta_find_latest(= struct pcache_meta_head /* Update latest if a more recent sequence is found */ if (!latest || pcache_meta_seq_after(meta->seq, seq_latest)) { seq_latest =3D meta->seq; - latest =3D (void *)header + (i * meta_max_size); + latest =3D meta_addr; } } =20 --=20 2.51.0 From nobody Mon Feb 9 00:30:14 2026 Received: from sender3-pp-f112.zoho.com (sender3-pp-f112.zoho.com [136.143.184.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D25F3195E3 for ; Thu, 30 Oct 2025 12:36:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.184.112 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761827781; cv=pass; b=qQjz1NVRHrjTarzE+iPwZP3PEJHi2ytMqeUUY1IOrdFaedBYkE0jBwOU5esk3goFDIR1AGeePYiXEn/M3uCxUtFVr1sUiBXZyRp5GpkVgVTRWcn56OopvIXFKlmaJgFzq03DmMlJJA1Xwu6f7MyqognEIJUpLN6FUDrKLXBqt6k= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761827781; c=relaxed/simple; bh=Dy5mN+mUFblKRdym21OGi3qMkGEXzXCYj1i7hdWWqEI=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f5qCXe2sjBQfnR+5DqY1KKAT/eRumEiIQ6nORHE3jLXqtTSs4tP3CceRb1lC2APdSgyY5WxJ9crImkEsSyJViid+o8P3jG6aCHsrdfj8os9fjoR+8EJ/FSsihheQACFrtM3xaqHmI6gYNnqNCwniv+zhBy5y7iy1qOxwUcNJuok= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty; spf=pass smtp.mailfrom=linux.beauty; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b=C3/tzCxp; arc=pass smtp.client-ip=136.143.184.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.beauty Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.beauty Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.beauty header.i=me@linux.beauty header.b="C3/tzCxp" ARC-Seal: i=1; a=rsa-sha256; t=1761827623; cv=none; d=zohomail.com; s=zohoarc; b=TbSb1YlBAqvuJNzw2m0h1L6cC0avHo92zOyyebPOKmUkkDslt7WLgkboeADd8WoHIuonxgnwlSI3FnXnzXtUv/dN1HKKeRh4ToUIn4ZlARCzcYOX7cXBXqnJmePc+bG6kNWjh9M6tYEKtDOoMvQOJwZY42fvmQMGOUXG8I7AHxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761827623; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=PspWpmNa95LwydSNmRMQC/seSofntuwNeQ9ulpO4Bz4=; b=A93ySmNYN8R0g+nKDK3ZuGNqct6/BwSBVECUA5EhaaD4/dpn8vEZq2R2xF4kgJB+wi7TIjVcswzSCqlUckkMitNvbWZniFsH167BoFPOnDPE/tXgXQcnqVV/8JlmJMT1EVUkLJZkyfqP+fziyDbVgGsE8r31D2ad2cRdvnSWcmo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=linux.beauty; spf=pass smtp.mailfrom=me@linux.beauty; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1761827623; s=zmail; d=linux.beauty; i=me@linux.beauty; h=From:From:To:To:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=PspWpmNa95LwydSNmRMQC/seSofntuwNeQ9ulpO4Bz4=; b=C3/tzCxpyTv97TuZ2tjFYYjwtvSw5Ih4f21z5LYyrJ2NVTlH4OKV8OZzBcet+PVo J4ZRhblVLeMMIrNQ4MtvEjtYFbJIvhqA5iXyb+xZjr7Jj4e7x3xDnZua3CGIBMHt9SR NkLSPojxBDhVrtB1phA0jZxirlEnjfBD1ldpn2+0= Received: by mx.zohomail.com with SMTPS id 1761827620954398.4862490820956; Thu, 30 Oct 2025 05:33:40 -0700 (PDT) From: Li Chen To: dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org, Dongsheng Yang , Zheng Gu Subject: [PATCH 3/3] dm-pcache: avoid leaking invalid metadata in pcache_meta_find_latest() Date: Thu, 30 Oct 2025 20:33:21 +0800 Message-ID: <20251030123323.967081-4-me@linux.beauty> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251030123323.967081-1-me@linux.beauty> References: <20251030123323.967081-1-me@linux.beauty> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" From: Li Chen Before this change pcache_meta_find_latest() was copying each slot directly into meta_ret while scanning. If no valid slot was found and the function returned NULL, meta_ret still held whatever was last copied (possibly CRC-bad). Later users (e.g. cache_segs_init) could mistakenly trust that data. Allocate a temporary buffer instead and only populate meta_ret after a valid/latest header is found. If no valid header exists we return NULL without touching meta_ret. Also add __free(kvfree) so the temporary buffer is always freed, and include the needed headers. Signed-off-by: Li Chen --- drivers/md/dm-pcache/pcache_internal.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm-pcache/pcache_internal.h b/drivers/md/dm-pcache/= pcache_internal.h index b7a3319d2bd3e..ac28f9dd2986f 100644 --- a/drivers/md/dm-pcache/pcache_internal.h +++ b/drivers/md/dm-pcache/pcache_internal.h @@ -4,6 +4,8 @@ =20 #include #include +#include +#include =20 #define pcache_err(fmt, ...) \ pr_err("dm-pcache: %s:%u " fmt, __func__, __LINE__, ##__VA_ARGS__) @@ -79,14 +81,17 @@ static inline void __must_check *pcache_meta_find_lates= t(struct pcache_meta_head u32 meta_size, u32 meta_max_size, void *meta_ret) { - struct pcache_meta_header *meta, *latest =3D NULL; + struct pcache_meta_header *latest =3D NULL; + struct pcache_meta_header *meta __free(kvfree); u32 i, seq_latest =3D 0; - void *meta_addr; =20 - meta =3D meta_ret; + meta =3D kvzalloc(meta_size, GFP_KERNEL); + if (!meta) + return ERR_PTR(-ENOMEM); =20 for (i =3D 0; i < PCACHE_META_INDEX_MAX; i++) { - meta_addr =3D (void *)header + (i * meta_max_size); + void *meta_addr =3D (void *)header + (i * meta_max_size); + if (copy_mc_to_kernel(meta, meta_addr, meta_size)) { pcache_err("hardware memory error when copy meta"); return ERR_PTR(-EIO); --=20 2.51.0