aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-07-22 12:54:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-15 01:59:08 -0400
commit31a9bd79d76026a8c8cff63c6887483e2e766ee4 (patch)
treedee00646786cfa8b5f50871da1ab2930ad906440
parent34a24b3fe7ee2234682e3abcad906c8c9c6de9aa (diff)
Btrfs: release both paths before logging dir/changed extents
commit f3b15ccdbb9a79781578249a63318805e55a6c34 upstream. The ceph guys tripped over this bug where we were still holding onto the original path that we used to copy the inode with when logging. This is based on Chris's fix which was reported to fix the problem. We need to drop the paths in two cases anyway so just move the drop up so that we don't have duplicate code. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/btrfs/tree-log.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index c276ac9a0ec3..cf68596b51fb 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -3728,8 +3728,9 @@ next_slot:
3728 } 3728 }
3729 3729
3730log_extents: 3730log_extents:
3731 btrfs_release_path(path);
3732 btrfs_release_path(dst_path);
3731 if (fast_search) { 3733 if (fast_search) {
3732 btrfs_release_path(dst_path);
3733 ret = btrfs_log_changed_extents(trans, root, inode, dst_path); 3734 ret = btrfs_log_changed_extents(trans, root, inode, dst_path);
3734 if (ret) { 3735 if (ret) {
3735 err = ret; 3736 err = ret;
@@ -3746,8 +3747,6 @@ log_extents:
3746 } 3747 }
3747 3748
3748 if (inode_only == LOG_INODE_ALL && S_ISDIR(inode->i_mode)) { 3749 if (inode_only == LOG_INODE_ALL && S_ISDIR(inode->i_mode)) {
3749 btrfs_release_path(path);
3750 btrfs_release_path(dst_path);
3751 ret = log_directory_changes(trans, root, inode, path, dst_path); 3750 ret = log_directory_changes(trans, root, inode, path, dst_path);
3752 if (ret) { 3751 if (ret) {
3753 err = ret; 3752 err = ret;