1 /* SPDX-License-Identifier: GPL-2.0 */ 2 3 #ifndef BTRFS_VERITY_H 4 #define BTRFS_VERITY_H 5 6 struct inode; 7 struct btrfs_inode; 8 9 #ifdef CONFIG_FS_VERITY 10 11 #include <linux/fsverity.h> 12 13 extern const struct fsverity_operations btrfs_verityops; 14 15 int btrfs_drop_verity_items(struct btrfs_inode *inode); 16 int btrfs_get_verity_descriptor(struct inode *inode, void *buf, size_t buf_size); 17 18 #else 19 20 #include <linux/errno.h> 21 22 static inline int btrfs_drop_verity_items(struct btrfs_inode *inode) 23 { 24 return 0; 25 } 26 27 static inline int btrfs_get_verity_descriptor(struct inode *inode, void *buf, 28 size_t buf_size) 29 { 30 return -EPERM; 31 } 32 33 #endif 34 35 #endif 36