blob: 79fdf243733d4c87acef1abb44a5125c4f5ba173 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/* 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