commit | 8ba97a15e7d4f70b9af71fa1db86a28dd17ad1b2 | [log] [tgz] |
---|---|---|
author | Jan Schmidt <list.btrfs@jan-o-sch.net> | Mon Jun 04 16:54:57 2012 +0200 |
committer | Jan Schmidt <list.btrfs@jan-o-sch.net> | Thu Jun 14 18:44:21 2012 +0200 |
tree | 08a2e49743eee382eca3e4b12415b372f898e3d8 | |
parent | f617e2fd52484fb74236a597d0f9068ec7d9d2dd [diff] |
Btrfs: use btrfs_read_lock_root_node in get_old_root 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>