]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commitdiff
ceph: disable fallocate for encrypted inodes
authorJeff Layton <jlayton@kernel.org>
Tue, 2 Mar 2021 19:58:22 +0000 (14:58 -0500)
committerJeff Layton <jlayton@kernel.org>
Tue, 31 May 2022 15:50:01 +0000 (11:50 -0400)
...hopefully, just for now.

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/ceph/file.c

index ce1898542b0859c13ee81afc953fe4826f980396..2ed7f184c0cf2c0c5f9b192df3c5971f5ae8a9d1 100644 (file)
@@ -2222,6 +2222,9 @@ static long ceph_fallocate(struct file *file, int mode,
        if (!S_ISREG(inode->i_mode))
                return -EOPNOTSUPP;
 
+       if (IS_ENCRYPTED(inode))
+               return -EOPNOTSUPP;
+
        prealloc_cf = ceph_alloc_cap_flush();
        if (!prealloc_cf)
                return -ENOMEM;