From ddd7dce99da550c4be77d474973155697434e8ee Mon Sep 17 00:00:00 2001 From: Brian Gerst Date: Mon, 11 Mar 2002 20:51:20 -0800 Subject: [PATCH] struct superblock cleanup - minixfs Start of cleaning up the union of filesystem-specific structures in struct super_block. The goal is to remove dependence on filesystem headers in fs.h. This patch abstracts the access to the minix_sb_info structure through the function minix_sb(). --- include/linux/minix_fs.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index c767d1ff8752..5953da6a02ac 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h @@ -32,7 +32,7 @@ #define MINIX_V1 0x0001 /* original minix fs */ #define MINIX_V2 0x0002 /* minix V2 fs */ -#define INODE_VERSION(inode) inode->i_sb->u.minix_sb.s_version +#define INODE_VERSION(inode) minix_sb(inode->i_sb)->s_version /* * This is the original minix inode layout on disk. @@ -90,6 +90,7 @@ struct minix_dir_entry { #ifdef __KERNEL__ #include +#include /* * change the define below to 0 if you want names > info->s_namelen chars to be @@ -131,6 +132,11 @@ extern struct file_operations minix_file_operations; extern struct file_operations minix_dir_operations; extern struct dentry_operations minix_dentry_operations; +static inline struct minix_sb_info *minix_sb(struct super_block *sb) +{ + return &sb->u.minix_sb; +} + static inline struct minix_inode_info *minix_i(struct inode *inode) { return list_entry(inode, struct minix_inode_info, vfs_inode); -- cgit v1.2.3