mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 17:51:57 +09:00
Btrfs: release both paths before logging dir/changed extents
commit f3b15ccdbb 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
34a24b3fe7
commit
31a9bd79d7
@@ -3728,8 +3728,9 @@ next_slot:
|
||||
}
|
||||
|
||||
log_extents:
|
||||
btrfs_release_path(path);
|
||||
btrfs_release_path(dst_path);
|
||||
if (fast_search) {
|
||||
btrfs_release_path(dst_path);
|
||||
ret = btrfs_log_changed_extents(trans, root, inode, dst_path);
|
||||
if (ret) {
|
||||
err = ret;
|
||||
@@ -3746,8 +3747,6 @@ log_extents:
|
||||
}
|
||||
|
||||
if (inode_only == LOG_INODE_ALL && S_ISDIR(inode->i_mode)) {
|
||||
btrfs_release_path(path);
|
||||
btrfs_release_path(dst_path);
|
||||
ret = log_directory_changes(trans, root, inode, path, dst_path);
|
||||
if (ret) {
|
||||
err = ret;
|
||||
|
||||
Reference in New Issue
Block a user