mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
77407dc032
commit
5c11adcc38
@ -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.
|
||||
|
28
fs/btrfs/verity.h
Normal file
28
fs/btrfs/verity.h
Normal file
@ -0,0 +1,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
|
Loading…
Reference in New Issue
Block a user