On Fri, Dec 15, 2023 at 05:43:53AM +0000, Matthew Wilcox wrote: > block_write_full_page() handles this fine, so why isn't this > > if (buffer_locked(bh)) > goto confused; > > Is the thought that we hold the folio locked, therefore no buffers > should be locked at this time? I don't know the rules. That would be my guess. For writeback on the fs mapping no one else should ever have locked the buffer. For the bdev mapping buffer locking isn't completely controlled by the bdevfs, but also by any mounted fs using the buffer cache. So from my POV your above change should be ok, but it'll need a big fat comment so that the next person seeing it in 20 years isn't as confused as you are now :)