Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor FileInode to avoid using its parent's TreeInode::Entry
Summary: Refactor FileInode and FileData so that they no longer store the TreeInode::Entry that refers to this file. The TreeInode::Entry is owned by the parent TreeInode and is not safe to access without holding the TreeInode contents_ lock, which the FileInode code never did. Additionally, once a FileInode is unlocked the TreeInode::Entry is destroyed. Previously the FileInode code would retain its pointer to this now invalid data, and could still dereference it. In the future I think it might be worth refactoring the FileInode/FileData split a bit more, but this at least addresses the issues around invalid accesses to entry_. Reviewed By: bolinfest Differential Revision: D4688058 fbshipit-source-id: 17d5d0c4e756afc6e3c4bb279cb1bb5231f3134f
- Loading branch information