From 399c7b4198bf70eadc1922eb7f307d8127d9f97a Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 2 Mar 2021 14:58:22 -0500 Subject: [PATCH] ceph: disable fallocate for encrypted inodes ...hopefully, just for now. Reviewed-by: Xiubo Li Signed-off-by: Jeff Layton --- fs/ceph/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ceph/file.c b/fs/ceph/file.c index ce1898542b085..2ed7f184c0cf2 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; -- 2.39.5