linux-stable/fs/btrfs/verity.h
David Sterba 22b46bdc5f btrfs: add forward declarations and headers, part 1
Do a cleanup in the short headers:

- add forward declarations for types referenced by pointers
- add includes when types need them

This fixes potential compilation problems if the headers are reordered
or the missing includes are not provided indirectly.

Signed-off-by: David Sterba <dsterba@suse.com>
2024-03-04 16:24:49 +01:00

35 lines
633 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef BTRFS_VERITY_H
#define BTRFS_VERITY_H
struct inode;
struct btrfs_inode;
#ifdef CONFIG_FS_VERITY
#include <linux/fsverity.h>
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
#include <linux/errno.h>
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