Skip to content

Commit 6f86f14

Browse files
Christoph Hellwigbrauner
authored andcommitted
erofs: use lockref_init for pcl->lockref
Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20250115094702.504610-8-hch@lst.de Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 8c32b87 commit 6f86f14

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/erofs/zdata.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,7 @@ static int z_erofs_register_pcluster(struct z_erofs_decompress_frontend *fe)
747747
if (IS_ERR(pcl))
748748
return PTR_ERR(pcl);
749749

750-
spin_lock_init(&pcl->lockref.lock);
751-
pcl->lockref.count = 1; /* one ref for this request */
750+
lockref_init(&pcl->lockref, 1); /* one ref for this request */
752751
pcl->algorithmformat = map->m_algorithmformat;
753752
pcl->length = 0;
754753
pcl->partial = true;

0 commit comments

Comments
 (0)