2022-10-26 19:08:37 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
|
|
|
|
#ifndef BTRFS_VERITY_H
|
|
|
|
#define BTRFS_VERITY_H
|
|
|
|
|
2024-01-26 23:53:06 +00:00
|
|
|
struct inode;
|
|
|
|
struct btrfs_inode;
|
|
|
|
|
2022-10-26 19:08:37 +00:00
|
|
|
#ifdef CONFIG_FS_VERITY
|
|
|
|
|
2024-01-26 23:53:06 +00:00
|
|
|
#include <linux/fsverity.h>
|
|
|
|
|
2022-10-26 19:08:37 +00: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-26 23:53:06 +00:00
|
|
|
#include <linux/errno.h>
|
|
|
|
|
2022-10-26 19:08:37 +00: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
|