]> git.hungrycats.org Git - linux/commitdiff
Revert "vfs: verify source area in vfs_dedupe_file_range_one()"
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 10 Dec 2021 01:03:48 +0000 (20:03 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 10 Dec 2021 01:03:48 +0000 (20:03 -0500)
This reverts commit 3078d85c9a1099405a0463c4d112ba97ee5bd217.

fs/remap_range.c

index e4a5fdd7ad7b095dd089477f361c7c8d7f0fc653..e40ba5e5c8a392a10c9f97177f37fdf923e2a5f8 100644 (file)
@@ -459,16 +459,8 @@ loff_t vfs_dedupe_file_range_one(struct file *src_file, loff_t src_pos,
        if (ret)
                return ret;
 
-       /*
-        * This is redundant if called from vfs_dedupe_file_range(), but other
-        * callers need it and it's not performance sesitive...
-        */
-       ret = remap_verify_area(src_file, src_pos, len, false);
-       if (ret)
-               goto out_drop_write;
-
        ret = remap_verify_area(dst_file, dst_pos, len, true);
-       if (ret)
+       if (ret < 0)
                goto out_drop_write;
 
        ret = -EPERM;