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>
This commit is contained in:
Alexander Block 2012-07-28 11:07:18 +02:00 committed by Chris Mason
parent 1f4692da95
commit b9291affaa
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}