fs: export empty_aops

With the ->sync_page() hook gone, we have a few users that
add their own static address_space_operations without any
functions defined.

fs/inode.c already has an empty_aops that it uses for init
purposes. Lets export that and use it in the places where
an otherwise empty aops was defined.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>

+12 -5
+8 -1
fs/inode.c
··· 125 125 static DECLARE_RWSEM(iprune_sem); 126 126 127 127 /* 128 + * Empty aops. Can be used for the cases where the user does not 129 + * define any of the address_space operations. 130 + */ 131 + const struct address_space_operations empty_aops = { 132 + }; 133 + EXPORT_SYMBOL(empty_aops); 134 + 135 + /* 128 136 * Statistics gathering.. 129 137 */ 130 138 struct inodes_stat_t inodes_stat; ··· 184 176 */ 185 177 int inode_init_always(struct super_block *sb, struct inode *inode) 186 178 { 187 - static const struct address_space_operations empty_aops; 188 179 static const struct inode_operations empty_iops; 189 180 static const struct file_operations empty_fops; 190 181 struct address_space *const mapping = &inode->i_data;
-2
fs/nilfs2/page.c
··· 495 495 void nilfs_mapping_init(struct address_space *mapping, 496 496 struct backing_dev_info *bdi) 497 497 { 498 - static const struct address_space_operations empty_aops; 499 - 500 498 mapping->host = NULL; 501 499 mapping->flags = 0; 502 500 mapping_set_gfp_mask(mapping, GFP_NOFS);
+2 -2
fs/ubifs/xattr.c
··· 56 56 */ 57 57 58 58 #include "ubifs.h" 59 + #include <linux/fs.h> 59 60 #include <linux/slab.h> 60 61 #include <linux/xattr.h> 61 62 #include <linux/posix_acl_xattr.h> ··· 81 80 }; 82 81 83 82 static const struct inode_operations none_inode_operations; 84 - static const struct address_space_operations none_address_operations; 85 83 static const struct file_operations none_file_operations; 86 84 87 85 /** ··· 130 130 } 131 131 132 132 /* Re-define all operations to be "nothing" */ 133 - inode->i_mapping->a_ops = &none_address_operations; 133 + inode->i_mapping->a_ops = &empty_aops; 134 134 inode->i_op = &none_inode_operations; 135 135 inode->i_fop = &none_file_operations; 136 136
+2
include/linux/fs.h
··· 613 613 int (*error_remove_page)(struct address_space *, struct page *); 614 614 }; 615 615 616 + extern const struct address_space_operations empty_aops; 617 + 616 618 /* 617 619 * pagecache_write_begin/pagecache_write_end must be used by general code 618 620 * to write into the pagecache.