[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <59d16fd0-4a9f-b293-18f8-58ed3250ea6c@linux.alibaba.com>
Date: Tue, 31 Oct 2023 14:26:57 +0800
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-erofs@...ts.ozlabs.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] erofs: fix erofs_insert_workgroup() lockref usage
On 2023/10/31 14:20, Linus Torvalds wrote:
> On Mon, 30 Oct 2023 at 20:08, Gao Xiang <hsiangkao@...ux.alibaba.com> 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
>> populated, it won't be accessed by others until it is inserted into
>> XArray, so lockref helpers are actually unneeded here.
>>
>> Let's just set the proper reference count on initializing.
>
> From a quick superficial look this looks like the right approach.
> Thanks for the quick response.
Thanks, I will trigger a stress test for this and it will be included
in this pull request...
Thanks,
Gao Xiang
>
> Linus
Powered by blists - more mailing lists