From: Jeff Layton Date: Thu, 25 Aug 2022 13:31:17 +0000 (-0400) Subject: ceph: disable fallocate for encrypted inodes X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e74e6eef290ceec200de0eccc75598cacedda621;p=ceph-client.git ceph: disable fallocate for encrypted inodes ...hopefully, just for now. Reviewed-by: Xiubo Li Signed-off-by: Jeff Layton --- diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 31de744b1a5f..64f8f668970f 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -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;