From: Christoph Hellwig Date: Wed, 15 Jan 2025 09:46:43 +0000 (+0100) Subject: erofs: use lockref_init for pcl->lockref X-Git-Tag: v6.14-rc1~216^2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6f86f1465b595864d4e4c58179f2ebcc3dbf5b62;p=thirdparty%2Fkernel%2Flinux.git erofs: use lockref_init for pcl->lockref Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250115094702.504610-8-hch@lst.de Reviewed-by: Gao Xiang Signed-off-by: Christian Brauner --- diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 01f1475054874..59f143d9744f9 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -747,8 +747,7 @@ static int z_erofs_register_pcluster(struct z_erofs_decompress_frontend *fe) if (IS_ERR(pcl)) return PTR_ERR(pcl); - spin_lock_init(&pcl->lockref.lock); - pcl->lockref.count = 1; /* one ref for this request */ + lockref_init(&pcl->lockref, 1); /* one ref for this request */ pcl->algorithmformat = map->m_algorithmformat; pcl->length = 0; pcl->partial = true;