diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-12-10 16:54:28 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-01-25 03:13:02 -0500 |
commit | f7f4f4dd6948e3bca0e04e5217c825052ad88f5a (patch) | |
tree | e7e047f1ec986eb4f0795d98cda5801aa265221e /fs/cramfs | |
parent | 2309fb8ef40e82c4175100c37eb3d9db9e572ca5 (diff) | |
download | lwn-f7f4f4dd6948e3bca0e04e5217c825052ad88f5a.tar.gz lwn-f7f4f4dd6948e3bca0e04e5217c825052ad88f5a.zip |
cramfs: take headers to fs/cramfs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cramfs')
-rw-r--r-- | fs/cramfs/inode.c | 24 | ||||
-rw-r--r-- | fs/cramfs/internal.h | 4 | ||||
-rw-r--r-- | fs/cramfs/uncompress.c | 2 |
3 files changed, 25 insertions, 5 deletions
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 508a7524fe38..06610cf94d57 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c @@ -17,14 +17,30 @@ #include <linux/init.h> #include <linux/string.h> #include <linux/blkdev.h> -#include <linux/cramfs_fs.h> #include <linux/slab.h> -#include <linux/cramfs_fs_sb.h> #include <linux/vfs.h> #include <linux/mutex.h> - +#include <uapi/linux/cramfs_fs.h> #include <asm/uaccess.h> +#include "internal.h" + +/* + * cramfs super-block data in memory + */ +struct cramfs_sb_info { + unsigned long magic; + unsigned long size; + unsigned long blocks; + unsigned long files; + unsigned long flags; +}; + +static inline struct cramfs_sb_info *CRAMFS_SB(struct super_block *sb) +{ + return sb->s_fs_info; +} + static const struct super_operations cramfs_ops; static const struct inode_operations cramfs_dir_inode_operations; static const struct file_operations cramfs_directory_operations; @@ -221,7 +237,7 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned i static void cramfs_kill_sb(struct super_block *sb) { - struct cramfs_sb_info *sbi = sb->s_fs_info; + struct cramfs_sb_info *sbi = CRAMFS_SB(sb); kill_block_super(sb); kfree(sbi); } diff --git a/fs/cramfs/internal.h b/fs/cramfs/internal.h new file mode 100644 index 000000000000..349d71272157 --- /dev/null +++ b/fs/cramfs/internal.h @@ -0,0 +1,4 @@ +/* Uncompression interfaces to the underlying zlib */ +int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen); +int cramfs_uncompress_init(void); +void cramfs_uncompress_exit(void); diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c index 023329800d2e..1760c1b84d97 100644 --- a/fs/cramfs/uncompress.c +++ b/fs/cramfs/uncompress.c @@ -19,7 +19,7 @@ #include <linux/errno.h> #include <linux/vmalloc.h> #include <linux/zlib.h> -#include <linux/cramfs_fs.h> +#include "internal.h" static z_stream stream; static int initialized; |