diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/send.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index bd69db72acc5..a2b3c594379d 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -4064,6 +4064,17 @@ static int process_recorded_refs(struct send_ctx *sctx, int *pending_move) if (ret < 0) goto out; } else { + /* + * If we previously orphanized a directory that + * collided with a new reference that we already + * processed, recompute the current path because + * that directory may be part of the path. + */ + if (orphanized_dir) { + ret = refresh_ref_path(sctx, cur); + if (ret < 0) + goto out; + } ret = send_unlink(sctx, cur->full_path); if (ret < 0) goto out; |