btrfs: send: fix spelling mistake: "send_in_progres" -> "send_in_progress"
[sfrench/cifs-2.6.git] / fs / btrfs / send.c
index 221e5cdb060be341d86cb0bb792b8601a5a81437..6e8184f239e00bf9cd2bd667ed58afdd659b72d3 100644 (file)
@@ -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) {
@@ -6450,7 +6454,7 @@ static void btrfs_root_dec_send_in_progress(struct btrfs_root* root)
         */
        if (root->send_in_progress < 0)
                btrfs_err(root->fs_info,
-                         "send_in_progres unbalanced %d root %llu",
+                         "send_in_progress unbalanced %d root %llu",
                          root->send_in_progress, root->root_key.objectid);
        spin_unlock(&root->root_item_lock);
 }