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 9 extern const struct file_operations incfs_file_ops; 10 extern const struct inode_operations incfs_file_inode_ops; 11 12 void incfs_kill_sb(struct super_block *sb); 13 struct dentry *incfs_mount_fs(struct file_system_type *type, int flags, 14 const char *dev_name, void *data); 15 int incfs_link(struct dentry *what, struct dentry *where); 16 int incfs_unlink(struct dentry *dentry); 17 get_mount_info(struct super_block * sb)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 file_superblock(struct file * f)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 34