diff options
-rw-r--r-- | fs/btrfs/send.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index cb9502adccdc..cdfd4357a784 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c | |||
@@ -3085,6 +3085,7 @@ static int process_recorded_refs(struct send_ctx *sctx, int *pending_move) | |||
3085 | u64 ow_gen; | 3085 | u64 ow_gen; |
3086 | int did_overwrite = 0; | 3086 | int did_overwrite = 0; |
3087 | int is_orphan = 0; | 3087 | int is_orphan = 0; |
3088 | u64 last_dir_ino_rm = 0; | ||
3088 | 3089 | ||
3089 | verbose_printk("btrfs: process_recorded_refs %llu\n", sctx->cur_ino); | 3090 | verbose_printk("btrfs: process_recorded_refs %llu\n", sctx->cur_ino); |
3090 | 3091 | ||
@@ -3349,7 +3350,8 @@ verbose_printk("btrfs: process_recorded_refs %llu\n", sctx->cur_ino); | |||
3349 | ret = send_utimes(sctx, cur->dir, cur->dir_gen); | 3350 | ret = send_utimes(sctx, cur->dir, cur->dir_gen); |
3350 | if (ret < 0) | 3351 | if (ret < 0) |
3351 | goto out; | 3352 | goto out; |
3352 | } else if (ret == inode_state_did_delete) { | 3353 | } else if (ret == inode_state_did_delete && |
3354 | cur->dir != last_dir_ino_rm) { | ||
3353 | ret = can_rmdir(sctx, cur->dir, sctx->cur_ino); | 3355 | ret = can_rmdir(sctx, cur->dir, sctx->cur_ino); |
3354 | if (ret < 0) | 3356 | if (ret < 0) |
3355 | goto out; | 3357 | goto out; |
@@ -3361,6 +3363,7 @@ verbose_printk("btrfs: process_recorded_refs %llu\n", sctx->cur_ino); | |||
3361 | ret = send_rmdir(sctx, valid_path); | 3363 | ret = send_rmdir(sctx, valid_path); |
3362 | if (ret < 0) | 3364 | if (ret < 0) |
3363 | goto out; | 3365 | goto out; |
3366 | last_dir_ino_rm = cur->dir; | ||
3364 | } | 3367 | } |
3365 | } | 3368 | } |
3366 | } | 3369 | } |