diff options
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r-- | fs/btrfs/send.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 221e5cdb060b..c0074d2d7d6d 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c | |||
@@ -5236,6 +5236,10 @@ static int send_write_or_clone(struct send_ctx *sctx, | |||
5236 | len = btrfs_file_extent_num_bytes(path->nodes[0], ei); | 5236 | len = btrfs_file_extent_num_bytes(path->nodes[0], ei); |
5237 | } | 5237 | } |
5238 | 5238 | ||
5239 | if (offset >= sctx->cur_inode_size) { | ||
5240 | ret = 0; | ||
5241 | goto out; | ||
5242 | } | ||
5239 | if (offset + len > sctx->cur_inode_size) | 5243 | if (offset + len > sctx->cur_inode_size) |
5240 | len = sctx->cur_inode_size - offset; | 5244 | len = sctx->cur_inode_size - offset; |
5241 | if (len == 0) { | 5245 | if (len == 0) { |