Re: [PATCH] filemap: obey mapping->invalidate_lock lock/unlock order

From: Matthew Wilcox
Date: Sat Jun 18 2022 - 06:34:52 EST


On Sat, Jun 18, 2022 at 04:38:20PM +0800, Miaohe Lin wrote:
> The invalidate_locks of two mappings should be unlocked in reverse order
> relative to the locking order in filemap_invalidate_lock_two(). Modifying

Why? It's perfectly valid to lock(A) lock(B) unlock(A) unlock(B).
If it weren't we'd have lockdep check it and complain.