linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Race condition in btrfs_releasepage?
@ 2014-10-26 18:07 Omar Sandoval
  0 siblings, 0 replies; only message in thread
From: Omar Sandoval @ 2014-10-26 18:07 UTC (permalink / raw)
  To: linux-btrfs, linux-fsdevel

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!
-- 
Omar

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-26 18:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-26 18:07 Race condition in btrfs_releasepage? Omar Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).