xref: /openbmc/linux/fs/btrfs/verity.h (revision d47a97bd)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 
3 #ifndef BTRFS_VERITY_H
4 #define BTRFS_VERITY_H
5 
6 #ifdef CONFIG_FS_VERITY
7 
8 extern const struct fsverity_operations btrfs_verityops;
9 
10 int btrfs_drop_verity_items(struct btrfs_inode *inode);
11 int btrfs_get_verity_descriptor(struct inode *inode, void *buf, size_t buf_size);
12 
13 #else
14 
15 static inline int btrfs_drop_verity_items(struct btrfs_inode *inode)
16 {
17 	return 0;
18 }
19 
20 static inline int btrfs_get_verity_descriptor(struct inode *inode, void *buf,
21 					      size_t buf_size)
22 {
23 	return -EPERM;
24 }
25 
26 #endif
27 
28 #endif
29