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) |
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 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/blkdev.h> | 19 | #include <linux/blkdev.h> |
20 | #include <linux/cramfs_fs.h> | ||
21 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
22 | #include <linux/cramfs_fs_sb.h> | ||
23 | #include <linux/vfs.h> | 21 | #include <linux/vfs.h> |
24 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
25 | 23 | #include <uapi/linux/cramfs_fs.h> | |
26 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
27 | 25 | ||
26 | #include "internal.h" | ||
27 | |||
28 | /* | ||
29 | * cramfs super-block data in memory | ||
30 | */ | ||
31 | struct cramfs_sb_info { | ||
32 | unsigned long magic; | ||
33 | unsigned long size; | ||
34 | unsigned long blocks; | ||
35 | unsigned long files; | ||
36 | unsigned long flags; | ||
37 | }; | ||
38 | |||
39 | static inline struct cramfs_sb_info *CRAMFS_SB(struct super_block *sb) | ||
40 | { | ||
41 | return sb->s_fs_info; | ||
42 | } | ||
43 | |||
28 | static const struct super_operations cramfs_ops; | 44 | static const struct super_operations cramfs_ops; |
29 | static const struct inode_operations cramfs_dir_inode_operations; | 45 | static const struct inode_operations cramfs_dir_inode_operations; |
30 | static const struct file_operations cramfs_directory_operations; | 46 | 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 | |||
221 | 237 | ||
222 | static void cramfs_kill_sb(struct super_block *sb) | 238 | static void cramfs_kill_sb(struct super_block *sb) |
223 | { | 239 | { |
224 | struct cramfs_sb_info *sbi = sb->s_fs_info; | 240 | struct cramfs_sb_info *sbi = CRAMFS_SB(sb); |
225 | kill_block_super(sb); | 241 | kill_block_super(sb); |
226 | kfree(sbi); | 242 | kfree(sbi); |
227 | } | 243 | } |
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 @@ | |||
1 | /* Uncompression interfaces to the underlying zlib */ | ||
2 | int cramfs_uncompress_block(void *dst, int dstlen, void *src, int srclen); | ||
3 | int cramfs_uncompress_init(void); | ||
4 | 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 @@ | |||
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/vmalloc.h> | 20 | #include <linux/vmalloc.h> |
21 | #include <linux/zlib.h> | 21 | #include <linux/zlib.h> |
22 | #include <linux/cramfs_fs.h> | 22 | #include "internal.h" |
23 | 23 | ||
24 | static z_stream stream; | 24 | static z_stream stream; |
25 | static int initialized; | 25 | static int initialized; |