Re: [PATCH] erofs: fix erofs_insert_workgroup() lockref usage

2023-10-31 Thread Chao Yu
On 2023/10/31 14:05, Gao Xiang wrote: As Linus pointed out [1], lockref_put_return() is fundamentally designed to be something that can fail. It behaves as a fastpath-only thing, and the failure case needs to be handled anyway. Actually, since the new pcluster was just allocated without being

Re: [PATCH] erofs: fix erofs_insert_workgroup() lockref usage

2023-10-31 Thread Gao Xiang
On 2023/10/31 14:20, Linus Torvalds wrote: On Mon, 30 Oct 2023 at 20:08, Gao Xiang wrote: As Linus pointed out [1], lockref_put_return() is fundamentally designed to be something that can fail. It behaves as a fastpath-only thing, and the failure case needs to be handled anyway.

Re: [PATCH] erofs: fix erofs_insert_workgroup() lockref usage

2023-10-31 Thread Linus Torvalds
On Mon, 30 Oct 2023 at 20:08, Gao Xiang wrote: > > As Linus pointed out [1], lockref_put_return() is fundamentally > designed to be something that can fail. It behaves as a fastpath-only > thing, and the failure case needs to be handled anyway. > > Actually, since the new pcluster was just

[PATCH] erofs: fix erofs_insert_workgroup() lockref usage

2023-10-31 Thread Gao Xiang
As Linus pointed out [1], lockref_put_return() is fundamentally designed to be something that can fail. It behaves as a fastpath-only thing, and the failure case needs to be handled anyway. Actually, since the new pcluster was just allocated without being populated, it won't be accessed by