Commit 5c11adcc authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: move verity prototypes into verity.h

Move these out of ctree.h into verity.h to cut down on code in ctree.h.
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 77407dc0
......@@ -741,28 +741,6 @@ static inline int is_fstree(u64 rootid)
return 0;
}
/* verity.c */
#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
/* Sanity test specific functions */
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
void btrfs_test_destroy_inode(struct inode *inode);
......
......@@ -67,6 +67,7 @@
#include "file.h"
#include "acl.h"
#include "relocation.h"
#include "verity.h"
struct btrfs_iget_args {
u64 ino;
......
......@@ -31,6 +31,7 @@
#include "dir-item.h"
#include "file-item.h"
#include "ioctl.h"
#include "verity.h"
/*
* Maximum number of references an extent can have in order for us to attempt to
......
......@@ -56,6 +56,7 @@
#include "dir-item.h"
#include "ioctl.h"
#include "scrub.h"
#include "verity.h"
#define CREATE_TRACE_POINTS
#include <trace/events/btrfs.h>
......
......@@ -19,6 +19,7 @@
#include "fs.h"
#include "accessors.h"
#include "ioctl.h"
#include "verity.h"
/*
* Implementation of the interface defined in struct fsverity_operations.
......
/* 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment