mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04: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
6 changed files with 32 additions and 22 deletions
|
@ -741,28 +741,6 @@ static inline int is_fstree(u64 rootid)
|
||||||
return 0;
|
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 */
|
/* Sanity test specific functions */
|
||||||
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
|
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
|
||||||
void btrfs_test_destroy_inode(struct inode *inode);
|
void btrfs_test_destroy_inode(struct inode *inode);
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "acl.h"
|
#include "acl.h"
|
||||||
#include "relocation.h"
|
#include "relocation.h"
|
||||||
|
#include "verity.h"
|
||||||
|
|
||||||
struct btrfs_iget_args {
|
struct btrfs_iget_args {
|
||||||
u64 ino;
|
u64 ino;
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "dir-item.h"
|
#include "dir-item.h"
|
||||||
#include "file-item.h"
|
#include "file-item.h"
|
||||||
#include "ioctl.h"
|
#include "ioctl.h"
|
||||||
|
#include "verity.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Maximum number of references an extent can have in order for us to attempt to
|
* Maximum number of references an extent can have in order for us to attempt to
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
#include "dir-item.h"
|
#include "dir-item.h"
|
||||||
#include "ioctl.h"
|
#include "ioctl.h"
|
||||||
#include "scrub.h"
|
#include "scrub.h"
|
||||||
|
#include "verity.h"
|
||||||
#define CREATE_TRACE_POINTS
|
#define CREATE_TRACE_POINTS
|
||||||
#include <trace/events/btrfs.h>
|
#include <trace/events/btrfs.h>
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
#include "accessors.h"
|
#include "accessors.h"
|
||||||
#include "ioctl.h"
|
#include "ioctl.h"
|
||||||
|
#include "verity.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Implementation of the interface defined in struct fsverity_operations.
|
* 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…
Add table
Add a link
Reference in a new issue