Btrfs: hold the tree mod lock in __tree_mod_log_rewind
authorJosef Bacik <jbacik@fusionio.com>
Sun, 30 Jun 2013 03:15:19 +0000 (23:15 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Tue, 2 Jul 2013 15:51:18 +0000 (11:51 -0400)
We need to hold the tree mod log lock in __tree_mod_log_rewind since we walk
forward in the tree mod entries, otherwise we'll end up with random entries and
trip the BUG_ON() at the front of __tree_mod_log_rewind.  This fixes the panics
people were seeing when running

find /whatever -type f -exec btrfs fi defrag {} \;

Thansk,

Cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <jbacik@fusionio.com>

No differences found