diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2018-05-09 17:40:44 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2018-05-09 17:40:44 +0200 |
commit | 4c0330208f6bfe5285bae239fdb2a7ec1ce1f78d (patch) | |
tree | 257c871b0be4c7eafa0e6911ab596bfb0f51a104 /fs/btrfs/send.c | |
parent | 7781edaed63e9396fc913e0899cb197562e6f1a0 (diff) | |
parent | 76aa3de7095f15af7300012cb29ea8ab93eec348 (diff) | |
download | talos-op-linux-4c0330208f6bfe5285bae239fdb2a7ec1ce1f78d.tar.gz talos-op-linux-4c0330208f6bfe5285bae239fdb2a7ec1ce1f78d.zip |
Merge tag 'at24-4.17-rc5-fixes-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current
Single bug-fix for a regression introduced during the 4.17 merge window.
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, len = btrfs_file_extent_num_bytes(path->nodes[0], ei); } + if (offset >= sctx->cur_inode_size) { + ret = 0; + goto out; + } if (offset + len > sctx->cur_inode_size) len = sctx->cur_inode_size - offset; if (len == 0) { |