diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 50ceb273f9dad60268609a542a3f5edfbafc832a..7fd4458cf0a78161c01c0ab7033d96272b370e68 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -9510,6 +9510,9 @@ static int btrfs_rename_exchange(struct inode *old_dir, goto out_notrans; } + if (dest != root) + btrfs_record_root_in_trans(trans, dest); + /* * We need to find a free sequence number both in the source and * in the destination directory for the exchange.