Re: Why does mpage_writepage() not handle locked buffers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 :)





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux