summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/verity.h
blob: 91c10f7d0a46543aa19d6cbef3eceb9ed72542c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* SPDX-License-Identifier: GPL-2.0 */

#ifndef BTRFS_VERITY_H
#define BTRFS_VERITY_H

#ifdef CONFIG_FS_VERITY

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

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