From f7f4f4dd6948e3bca0e04e5217c825052ad88f5a Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 10 Dec 2013 16:54:28 -0500 Subject: [PATCH] cramfs: take headers to fs/cramfs Signed-off-by: Al Viro --- arch/blackfin/kernel/setup.c | 2 +- arch/cris/arch-v32/drivers/axisflashmap.c | 2 -- fs/cramfs/inode.c | 24 +++++++++++++++---- .../linux/cramfs_fs.h => fs/cramfs/internal.h | 6 ----- fs/cramfs/uncompress.c | 2 +- include/linux/cramfs_fs_sb.h | 20 ---------------- init/do_mounts_rd.c | 2 +- 7 files changed, 23 insertions(+), 35 deletions(-) rename include/linux/cramfs_fs.h => fs/cramfs/internal.h (70%) delete mode 100644 include/linux/cramfs_fs_sb.h diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 396193042127..4f424ae3b36d 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -17,7 +17,7 @@ #ifdef CONFIG_MTD_UCLINUX #include #include -#include +#include #include #endif diff --git a/arch/cris/arch-v32/drivers/axisflashmap.c b/arch/cris/arch-v32/drivers/axisflashmap.c index 1b6ad6247204..28dd77144e8f 100644 --- a/arch/cris/arch-v32/drivers/axisflashmap.c +++ b/arch/cris/arch-v32/drivers/axisflashmap.c @@ -24,8 +24,6 @@ #include #include -#include - #include #include 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 #include #include -#include #include -#include #include #include - +#include #include +#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/include/linux/cramfs_fs.h b/fs/cramfs/internal.h similarity index 70% rename from include/linux/cramfs_fs.h rename to fs/cramfs/internal.h index 133789609f23..349d71272157 100644 --- a/include/linux/cramfs_fs.h +++ b/fs/cramfs/internal.h @@ -1,10 +1,4 @@ -#ifndef __CRAMFS_H -#define __CRAMFS_H - -#include - /* 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); -#endif 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 #include #include -#include +#include "internal.h" static z_stream stream; static int initialized; diff --git a/include/linux/cramfs_fs_sb.h b/include/linux/cramfs_fs_sb.h deleted file mode 100644 index 8390693568fd..000000000000 --- a/include/linux/cramfs_fs_sb.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _CRAMFS_FS_SB -#define _CRAMFS_FS_SB - -/* - * 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; -} - -#endif diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index 7c098ac9068a..a8227022e3a0 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include -- 2.20.1