From: Jeff Layton Date: Tue, 2 Mar 2021 19:58:22 +0000 (-0500) Subject: ceph: disable fallocate for encrypted inodes X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=399c7b4198bf70eadc1922eb7f307d8127d9f97a;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 ce1898542b08..2ed7f184c0cf 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -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;