Re: [PATCH] erofs: remove erofs_dev_context->rwsem

Gao Xiang <[email protected]>
Newsgroups org.ozlabs.lists.linux-erofs,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi Bingwu,

On Sun, Aug 16, 2026 at 10:00:12AM +0800, Bingwu Zhang wrote:
> From: Bingwu Zhang <[email protected]>
> 
> devs->tree is only modified in initialization and
> destruction code paths and will never be concurrent
> with data reading. Thus there is no need to guard
> idr_alloc/idr_find with a rwsem.

Thanks for the patch.

In principle, yes, but it's also no problem to leave it as-is in case
some use cases later need adjust the device_info of a dev for example
at runtime.

Or if it causes any noticeable performance penalty, that will be one
reason to drop it now.

Thanks,
Gao Xiang

> 
> Signed-off-by: Bingwu Zhang <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.