]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
ceph: disable fallocate for encrypted inodes
authorJeff Layton <jlayton@kernel.org>
Thu, 25 Aug 2022 13:31:17 +0000 (09:31 -0400)
committerXiubo Li <xiubli@redhat.com>
Fri, 26 Aug 2022 23:58:56 +0000 (07:58 +0800)
...hopefully, just for now.

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

index 31de744b1a5f2672a7086119cde53b6cafbb86ca..64f8f668970fefd7b8f33ba078a883cedcfb33ef 100644 (file)
@@ -2183,6 +2183,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;