diff mbox series

[7/8] erofs: use lockref_init for pcl->lockref

Message ID 20250115094702.504610-8-hch@lst.de (mailing list archive)
State New
Headers show
Series [1/8] lockref: remove lockref_put_not_zero | expand

Commit Message

Christoph Hellwig Jan. 15, 2025, 9:46 a.m. UTC
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/erofs/zdata.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Gao Xiang Jan. 15, 2025, 9:49 a.m. UTC | #1
On 2025/1/15 17:46, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>

Thanks,
Gao Xiang
diff mbox series

Patch

diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 19ef4ff2a134..254f6ad2c336 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;