Btrfs: use btrfs_read_lock_root_node in get_old_root
authorJan Schmidt <list.btrfs@jan-o-sch.net>
Mon, 4 Jun 2012 14:54:57 +0000 (16:54 +0200)
committerJan Schmidt <list.btrfs@jan-o-sch.net>
Thu, 14 Jun 2012 16:44:21 +0000 (18:44 +0200)
get_old_root could race with root node updates because we weren't locking
the node early enough. Use btrfs_read_lock_root_node to grab the root locked
in the very beginning and release the lock as soon as possible (just like
btrfs_search_slot does).

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>

No differences found