]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
f2fs: fix parameters of __exchange_data_block
authorFan Li <fanofcode.li@samsung.com>
Sat, 10 Sep 2016 03:19:37 +0000 (11:19 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 13 Sep 2016 20:02:33 +0000 (13:02 -0700)
__exchange_data_block should take block indexes as parameters
instead of offsets in bytes.

Signed-off-by: Fan li <fanofcode.li@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c

index b8a521f6c2d5ae4d59ba7ce781f1ae59881e9c7d..40fe72e5147cbde16e8ffd622e30f8bfafd54f94 100644 (file)
@@ -2143,8 +2143,9 @@ static int f2fs_move_file_range(struct file *file_in, loff_t pos_in,
 
        f2fs_balance_fs(sbi, true);
        f2fs_lock_op(sbi);
-       ret = __exchange_data_block(src, dst, pos_in,
-                               pos_out, len >> F2FS_BLKSIZE_BITS, false);
+       ret = __exchange_data_block(src, dst, pos_in >> F2FS_BLKSIZE_BITS,
+                               pos_out >> F2FS_BLKSIZE_BITS,
+                               len >> F2FS_BLKSIZE_BITS, false);
 
        if (!ret) {
                if (dst_max_i_size)