diff --git a/fs/ceph/file.c b/fs/ceph/file.c index b74c9bf2cef1..17e26c030f5f 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -369,6 +369,12 @@ int ceph_open(struct inode *inode, struct file *file) fmode = ceph_flags_to_mode(flags); wanted = ceph_caps_for_mode(fmode); + if (S_ISREG(inode->i_mode)) { + err = fscrypt_file_open(inode, file); + if (err) + return err; + } + /* snapped files are read-only */ if (ceph_snap(inode) != CEPH_NOSNAP && (file->f_mode & FMODE_WRITE)) return -EROFS;
Signed-off-by: Jeff Layton <jlayton@kernel.org> --- fs/ceph/file.c | 6 ++++++ 1 file changed, 6 insertions(+)