diff options
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r-- | fs/btrfs/send.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index ab34a23838ef..e8e9f354f341 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -4986,7 +4986,9 @@ static int finish_inode_if_needed(struct send_ctx *sctx, int at_end) if (S_ISREG(sctx->cur_inode_mode)) { if (need_send_hole(sctx)) { - if (sctx->cur_inode_last_extent == (u64)-1) { + if (sctx->cur_inode_last_extent == (u64)-1 || + sctx->cur_inode_last_extent < + sctx->cur_inode_size) { ret = get_last_extent(sctx, (u64)-1); if (ret) goto out; |