提交 87e06aa3 编写于 作者: A Axel Lin 提交者: Linus Torvalds

fs/ramfs: move ramfs_aops to inode.c

ramfs_aops is identical in file-mmu.c and file-nommu.c.  Thus move it to
fs/ramfs/inode.c and make it static.
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0fa9aa20
...@@ -30,13 +30,6 @@ ...@@ -30,13 +30,6 @@
#include "internal.h" #include "internal.h"
const struct address_space_operations ramfs_aops = {
.readpage = simple_readpage,
.write_begin = simple_write_begin,
.write_end = simple_write_end,
.set_page_dirty = __set_page_dirty_no_writeback,
};
const struct file_operations ramfs_file_operations = { const struct file_operations ramfs_file_operations = {
.read = do_sync_read, .read = do_sync_read,
.aio_read = generic_file_aio_read, .aio_read = generic_file_aio_read,
......
...@@ -34,13 +34,6 @@ static unsigned long ramfs_nommu_get_unmapped_area(struct file *file, ...@@ -34,13 +34,6 @@ static unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
unsigned long flags); unsigned long flags);
static int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma); static int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma);
const struct address_space_operations ramfs_aops = {
.readpage = simple_readpage,
.write_begin = simple_write_begin,
.write_end = simple_write_end,
.set_page_dirty = __set_page_dirty_no_writeback,
};
const struct file_operations ramfs_file_operations = { const struct file_operations ramfs_file_operations = {
.mmap = ramfs_nommu_mmap, .mmap = ramfs_nommu_mmap,
.get_unmapped_area = ramfs_nommu_get_unmapped_area, .get_unmapped_area = ramfs_nommu_get_unmapped_area,
......
...@@ -43,6 +43,13 @@ ...@@ -43,6 +43,13 @@
static const struct super_operations ramfs_ops; static const struct super_operations ramfs_ops;
static const struct inode_operations ramfs_dir_inode_operations; static const struct inode_operations ramfs_dir_inode_operations;
static const struct address_space_operations ramfs_aops = {
.readpage = simple_readpage,
.write_begin = simple_write_begin,
.write_end = simple_write_end,
.set_page_dirty = __set_page_dirty_no_writeback,
};
static struct backing_dev_info ramfs_backing_dev_info = { static struct backing_dev_info ramfs_backing_dev_info = {
.name = "ramfs", .name = "ramfs",
.ra_pages = 0, /* No readahead */ .ra_pages = 0, /* No readahead */
......
...@@ -10,5 +10,4 @@ ...@@ -10,5 +10,4 @@
*/ */
extern const struct address_space_operations ramfs_aops;
extern const struct inode_operations ramfs_file_inode_operations; extern const struct inode_operations ramfs_file_inode_operations;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册