]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
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)
commitf1ca7e98a67da618d8595866e0860308525154da
tree55e4374235a9d6eee5068e55e1297d97cbe859e8
parent261c84b662f93e0eb75bccd6cd732391d005060a
Btrfs: hold the tree mod lock in __tree_mod_log_rewind

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>
fs/btrfs/ctree.c