f2fs: fix to check compress file in f2fs_move_file_range()
[sfrench/cifs-2.6.git] / fs / f2fs / file.c
index 156b0ff05a3b81822fb6abcd50118605a299c0c4..5c2f99ada6bed19613a72d5b0e563c612304ca07 100644 (file)
@@ -2813,6 +2813,11 @@ static int f2fs_move_file_range(struct file *file_in, loff_t pos_in,
                        goto out;
        }
 
+       if (f2fs_compressed_file(src) || f2fs_compressed_file(dst)) {
+               ret = -EOPNOTSUPP;
+               goto out_unlock;
+       }
+
        ret = -EINVAL;
        if (pos_in + len > src->i_size || pos_in + len < pos_in)
                goto out_unlock;