Skip to content

Commit

Permalink
Btrfs: add missing check for dir != tmp_dir to is_first_ref
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Block authored and Chris Mason committed Oct 1, 2012
1 parent 1f4692d commit b9291af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b9291af

Please sign in to comment.