diff options
author | Chris Mason <clm@fb.com> | 2014-01-09 17:28:00 -0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-29 07:06:30 -0800 |
commit | 90d3e592e99b8e374ead2b45148abf506493a959 (patch) | |
tree | 9e2b61f449524e988dacb04a770b87a2e3fddc23 /lib | |
parent | 514ac8ad8793a097c0c9d89202c642479d6dfa34 (diff) | |
download | linux-90d3e592e99b8e374ead2b45148abf506493a959.tar.bz2 |
Btrfs: setup inode location during btrfs_init_inode_locked
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: Chris Mason <clm@fb.com>
CC: stable@vger.kernel.org
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions