btrfs: fix race in reada
authorArne Jansen <sensille@gmx.net>
Sat, 25 Feb 2012 08:09:30 +0000 (09:09 +0100)
committerDavid Sterba <dsterba@suse.cz>
Wed, 18 Apr 2012 17:12:44 +0000 (19:12 +0200)
commit8c9c2bf7a3c4f7e9d158c0be9c49f372fb943ad2
tree6c17b4db9b39cb8eb950c21377f453df18f467c3
parent848cce0d4102b5b4b26b0987b43e1919d462afe2
btrfs: fix race in reada

When inserting into the radix tree returns EEXIST, get the existing
entry without giving up the spinlock in between.
There was a race for both the zones trees and the extent tree.

Signed-off-by: Arne Jansen <sensille@gmx.net>
fs/btrfs/inode.c
fs/btrfs/reada.c