Race condition in btrfs_releasepage?
Subsystems (2)
So I may be completely wrong here and someone might come in and tell me why this doesn't matter, but I'm just trying to understand the BTRFS code and I came across something that confused me.
try_release_extent_mapping appears to access page->mapping->host->i_size without any sort of serialization. It's used in the implementation of btrfs_releasepage, and aops->releasepage, as far as I can tell, isn't called with any locks held. Should we be grabbing i_mutex or using i_size_read here instead? I'm not too familiar with the locking rules for inodes or releasepage.
Thanks!
Signature · 1 line
Omar