提交 5c11adcc 编写于 作者: J Josef Bacik 提交者: 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: NJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: NJosef Bacik <josef@toxicpanda.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 77407dc0
...@@ -741,28 +741,6 @@ static inline int is_fstree(u64 rootid) ...@@ -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 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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.
......
/* 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册