Linux 6.13-rc4
[linux.git] / fs / btrfs / verity.h
blobd696659e43e43d7221dcc56f848238d0c1a413e0
1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifndef BTRFS_VERITY_H
4 #define BTRFS_VERITY_H
6 struct inode;
7 struct btrfs_inode;
9 #ifdef CONFIG_FS_VERITY
11 #include <linux/fsverity.h>
13 extern const struct fsverity_operations btrfs_verityops;
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);
18 #else
20 #include <linux/errno.h>
22 static inline int btrfs_drop_verity_items(struct btrfs_inode *inode)
24 return 0;
27 static inline int btrfs_get_verity_descriptor(struct inode *inode, void *buf,
28 size_t buf_size)
30 return -EPERM;
33 #endif
35 #endif