Skip to content

Commit

Permalink
cramfs: take headers to fs/cramfs
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Jan 25, 2014
1 parent 2309fb8 commit f7f4f4d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 35 deletions.
2 changes: 1 addition & 1 deletion arch/blackfin/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifdef CONFIG_MTD_UCLINUX
#include <linux/mtd/map.h>
#include <linux/ext2_fs.h>
#include <linux/cramfs_fs.h>
#include <uapi/linux/cramfs_fs.h>
#include <linux/romfs_fs.h>
#endif

Expand Down
2 changes: 0 additions & 2 deletions arch/cris/arch-v32/drivers/axisflashmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#include <linux/mtd/mtdram.h>
#include <linux/mtd/partitions.h>

#include <linux/cramfs_fs.h>

#include <asm/axisflashmap.h>
#include <asm/mmu.h>

Expand Down
24 changes: 20 additions & 4 deletions fs/cramfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down
6 changes: 0 additions & 6 deletions include/linux/cramfs_fs.h → fs/cramfs/internal.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#ifndef __CRAMFS_H
#define __CRAMFS_H

#include <uapi/linux/cramfs_fs.h>

/* 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
2 changes: 1 addition & 1 deletion fs/cramfs/uncompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 0 additions & 20 deletions include/linux/cramfs_fs_sb.h

This file was deleted.

2 changes: 1 addition & 1 deletion init/do_mounts_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <linux/minix_fs.h>
#include <linux/ext2_fs.h>
#include <linux/romfs_fs.h>
#include <linux/cramfs_fs.h>
#include <uapi/linux/cramfs_fs.h>
#include <linux/initrd.h>
#include <linux/string.h>
#include <linux/slab.h>
Expand Down

0 comments on commit f7f4f4d

Please sign in to comment.