Skip to content

Commit fb9b653

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs: fix to check compress file in f2fs_move_file_range()
f2fs_move_file_range() doesn't support migrating compressed cluster data, let's add the missing check condition and return -EOPNOTSUPP for the case until we support it. Fixes: 4c8ff70 ("f2fs: support data compression") Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 55fdc1c commit fb9b653

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

fs/f2fs/file.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2813,6 +2813,11 @@ static int f2fs_move_file_range(struct file *file_in, loff_t pos_in,
28132813
goto out;
28142814
}
28152815

2816+
if (f2fs_compressed_file(src) || f2fs_compressed_file(dst)) {
2817+
ret = -EOPNOTSUPP;
2818+
goto out_unlock;
2819+
}
2820+
28162821
ret = -EINVAL;
28172822
if (pos_in + len > src->i_size || pos_in + len < pos_in)
28182823
goto out_unlock;

0 commit comments

Comments
 (0)