2022-10-27 03:08:37 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
|
|
|
|
#ifndef BTRFS_VERITY_H
|
|
|
|
#define BTRFS_VERITY_H
|
|
|
|
|
2024-01-27 07:53:06 +08:00
|
|
|
struct inode;
|
|
|
|
struct btrfs_inode;
|
|
|
|
|
2022-10-27 03:08:37 +08:00
|
|
|
#ifdef CONFIG_FS_VERITY
|
|
|
|
|
2024-01-27 07:53:06 +08:00
|
|
|
#include <linux/fsverity.h>
|
|
|
|
|
2022-10-27 03:08:37 +08:00
|
|
|
extern const struct fsverity_operations btrfs_verityops;
|
|
|
|
|
|
|
|
int btrfs_drop_verity_items(struct btrfs_inode *inode);
|
|
|
|
int btrfs_get_verity_descriptor(struct inode *inode, void *buf, size_t buf_size);
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2024-01-27 07:53:06 +08:00
|
|
|
#include <linux/errno.h>
|
|
|
|
|
2022-10-27 03:08:37 +08:00
|
|
|
static inline int btrfs_drop_verity_items(struct btrfs_inode *inode)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int btrfs_get_verity_descriptor(struct inode *inode, void *buf,
|
|
|
|
size_t buf_size)
|
|
|
|
{
|
|
|
|
return -EPERM;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|