summaryrefslogtreecommitdiff
path: root/include/linux/fscrypt_notsupp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fscrypt_notsupp.h')
-rw-r--r--include/linux/fscrypt_notsupp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/fscrypt_notsupp.h b/include/linux/fscrypt_notsupp.h
index 7b390e356f7f..162da6517ac4 100644
--- a/include/linux/fscrypt_notsupp.h
+++ b/include/linux/fscrypt_notsupp.h
@@ -177,4 +177,13 @@ static inline int fscrypt_zeroout_range(const struct inode *inode, pgoff_t lblk,
return -EOPNOTSUPP;
}
+/* hooks.c */
+
+static inline int fscrypt_file_open(struct inode *inode, struct file *filp)
+{
+ if (IS_ENCRYPTED(inode))
+ return -EOPNOTSUPP;
+ return 0;
+}
+
#endif /* _LINUX_FSCRYPT_NOTSUPP_H */