aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'fs/incfs/vfs.h')
-rw-r--r--fs/incfs/vfs.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/fs/incfs/vfs.h b/fs/incfs/vfs.h
new file mode 100644
index 000000000000..79fdf243733d
--- /dev/null
+++ b/fs/incfs/vfs.h
@@ -0,0 +1,33 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright 2018 Google LLC
4 */
5
6#ifndef _INCFS_VFS_H
7#define _INCFS_VFS_H
8
9extern const struct file_operations incfs_file_ops;
10extern const struct inode_operations incfs_file_inode_ops;
11
12void incfs_kill_sb(struct super_block *sb);
13struct dentry *incfs_mount_fs(struct file_system_type *type, int flags,
14 const char *dev_name, void *data);
15int incfs_link(struct dentry *what, struct dentry *where);
16int incfs_unlink(struct dentry *dentry);
17
18static inline struct mount_info *get_mount_info(struct super_block *sb)
19{
20 struct mount_info *result = sb->s_fs_info;
21
22 WARN_ON(!result);
23 return result;
24}
25
26static inline struct super_block *file_superblock(struct file *f)
27{
28 struct inode *inode = file_inode(f);
29
30 return inode->i_sb;
31}
32
33#endif