On Mon, Dec 16, 2024 at 04:49:01PM +0100, Christoph Hellwig wrote: > On Mon, Dec 16, 2024 at 04:02:03PM +0800, Ming Lei wrote: > > More importantly, queue_limits_start_update() returns one local copy of > > q->limits, then the API user overwrites the local copy, and commit the > > copy by queue_limits_commit_update() finally. > > > > So holding q->limits_lock protects nothing for the local copy, and not see > > any real help by preventing new update & commit from happening, cause > > what matters is that we do validation & commit atomically. > > It protects against someone else changing the copy in the queue while > the current thread is updating the local copy, and thus incoherent > updates. So no, we can't just remove it. The local copy can be updated in any way with any data, so does another concurrent update on q->limits really matter? thanks, Ming