On Wed, Jul 31, 2024 at 05:13:04PM +0800, Zhang Yi wrote: > Commit '1cea335d1db1 ("iomap: fix sub-page uptodate handling")' fix a > race issue when submitting multiple read bios for a page spans more than > one file system block by adding a spinlock(which names state_lock now) > to make the page uptodate synchronous. However, the race condition only > happened between the read I/O submitting and completeing threads, it's > sufficient to use page lock to protect other paths, e.g. buffered write > path. After large folio is supported, the spinlock could affect more > about the buffered write performance, so drop it could reduce some > unnecessary locking overhead. This patch doesn't work. If we get two read completions at the same time for blocks belonging to the same folio, they will both write to the uptodate array at the same time.