Commit b9291aff authored by Alexander Block's avatar Alexander Block Committed by Chris Mason
Browse files

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: default avatarAlex Lyakas <alex.bolshoy.btrfs@gmail.com>
Signed-off-by: default avatarAlexander Block <ablock84@googlemail.com>
parent 1f4692da
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}