fs/ramfs: move ramfs_aops to inode.c
authorAxel Lin <axel.lin@ingics.com>
Thu, 23 Jan 2014 23:54:55 +0000 (15:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 00:36:58 +0000 (16:36 -0800)
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: Axel Lin <axel.lin@ingics.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ramfs/file-mmu.c
fs/ramfs/file-nommu.c
fs/ramfs/inode.c
fs/ramfs/internal.h

index 4884ac5ae9bea224517e384588847a44f4f8e462..1e56a4e8cf7cd47d4886731ea063c95be9f078ee 100644 (file)
 
 #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 = {
        .read           = do_sync_read,
        .aio_read       = generic_file_aio_read,
index 80862b1aeea7cac372b6f3bc2aeeadc5b9e406ab..0b3d8e4cb2fa00dd8b906d1ddc811bc17a4c8e07 100644 (file)
@@ -34,13 +34,6 @@ static unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
                                                   unsigned long flags);
 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 = {
        .mmap                   = ramfs_nommu_mmap,
        .get_unmapped_area      = ramfs_nommu_get_unmapped_area,
index 6a3e2c4201805429a8debf15ec30be10cda209bd..d365b1c4eb3cbe469965ba4a0e93d63a57124cc7 100644 (file)
 static const struct super_operations ramfs_ops;
 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 = {
        .name           = "ramfs",
        .ra_pages       = 0,    /* No readahead */
index 6b330639b51dc7b497d6cc9ac8726ce0c004ec37..a9d8ae88fa15428d20c432c121cab5ca868eb42a 100644 (file)
@@ -10,5 +10,4 @@
  */
 
 
-extern const struct address_space_operations ramfs_aops;
 extern const struct inode_operations ramfs_file_inode_operations;