summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
authorAlexander Block <ablock84@googlemail.com>2012-07-28 11:07:18 +0200
committerChris Mason <chris.mason@fusionio.com>2012-10-01 21:18:45 +0200
commitb9291affaa4576762c30fb31083f33f5d745dea1 (patch)
tree33fde8a7f7f7e492a5eccb9e78c699fd47e9c0a4 /fs/btrfs/send.c
parentBtrfs: fix cur_ino < parent_ino case for send/receive (diff)
downloadlinux-b9291affaa4576762c30fb31083f33f5d745dea1.tar.xz
linux-b9291affaa4576762c30fb31083f33f5d745dea1.zip
Btrfs: add missing check for dir != tmp_dir to is_first_ref
We missed that check which resultet in all refs with the same name being reported as first_ref. Reported-by: Alex Lyakas <alex.bolshoy.btrfs@gmail.com> Signed-off-by: Alexander Block <ablock84@googlemail.com>
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r--fs/btrfs/send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index a5fae484d4e1..bea5b4378cc5 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -1589,7 +1589,7 @@ static int is_first_ref(struct send_ctx *sctx,
if (ret < 0)
goto out;
- if (name_len != fs_path_len(tmp_name)) {
+ if (dir != tmp_dir || name_len != fs_path_len(tmp_name)) {
ret = 0;
goto out;
}