On Thu, Oct 22, 2020 at 12:58:47PM +0900, Daeho Jeong wrote:
> +     if (!f2fs_compressed_file(inode)) {
> +             inode_unlock(inode);
> +             return -EINVAL;
> +     }

How about using ENODATA here?  EINVAL tends to be used for lots of different
reasons, and it's not always clear what it means.

Note that FS_IOC_GET_ENCRYPTION_POLICY fails with ENODATA when called on an
unencrypted file, which is a similar case.

- Eric

Reply via email to