• C
    Btrfs: setup inode location during btrfs_init_inode_locked · 90d3e592
    Chris Mason 提交于
    We have a race during inode init because the BTRFS_I(inode)->location is setup
    after the inode hash table lock is dropped.  btrfs_find_actor uses the location
    field, so our search might not find an existing inode in the hash table if we
    race with the inode init code.
    
    This commit changes things to setup the location field sooner.  Also the find actor now
    uses only the location objectid to match inodes.  For inode hashing, we just
    need a unique and stable test, it doesn't have to reflect the inode numbers we
    show to userland.
    Signed-off-by: NChris Mason <clm@fb.com>
    CC: stable@vger.kernel.org
    90d3e592
inode.c 236.6 KB