From afdbad282827cd5efe4832189c87985383e1a0b7 Mon Sep 17 00:00:00 2001 From: Sedat Dilek Date: Mon, 4 Apr 2011 01:02:55 +0200 Subject: [PATCH 1/3] Revert "fs: export empty_aops" This reverts commit 52dc75abbfc8c352875d8e9a9006b325c136bd58. Signed-off-by: Sedat Dilek --- fs/inode.c | 8 +------- fs/nilfs2/page.c | 2 ++ fs/ubifs/xattr.c | 4 ++-- include/linux/fs.h | 2 -- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index b818730..5f4e11a 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -125,13 +125,6 @@ __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_wb_list_lock); static DECLARE_RWSEM(iprune_sem); /* - * Empty aops. Can be used for the cases where the user does not - * define any of the address_space operations. - */ -const struct address_space_operations empty_aops = { -}; - -/* * Statistics gathering.. */ struct inodes_stat_t inodes_stat; @@ -183,6 +176,7 @@ int proc_nr_inodes(ctl_table *table, int write, */ int inode_init_always(struct super_block *sb, struct inode *inode) { + static const struct address_space_operations empty_aops; static const struct inode_operations empty_iops; static const struct file_operations empty_fops; struct address_space *const mapping = &inode->i_data; diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index 1168059..9d2dc6b 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c @@ -495,6 +495,8 @@ unsigned nilfs_page_count_clean_buffers(struct page *page, void nilfs_mapping_init(struct address_space *mapping, struct backing_dev_info *bdi) { + static const struct address_space_operations empty_aops; + mapping->host = NULL; mapping->flags = 0; mapping_set_gfp_mask(mapping, GFP_NOFS); diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c index 3299f46..c74400f 100644 --- a/fs/ubifs/xattr.c +++ b/fs/ubifs/xattr.c @@ -56,7 +56,6 @@ */ #include "ubifs.h" -#include #include #include #include @@ -81,6 +80,7 @@ enum { }; static const struct inode_operations none_inode_operations; +static const struct address_space_operations none_address_operations; static const struct file_operations none_file_operations; /** @@ -130,7 +130,7 @@ static int create_xattr(struct ubifs_info *c, struct inode *host, } /* Re-define all operations to be "nothing" */ - inode->i_mapping->a_ops = &empty_aops; + inode->i_mapping->a_ops = &none_address_operations; inode->i_op = &none_inode_operations; inode->i_fop = &none_file_operations; diff --git a/include/linux/fs.h b/include/linux/fs.h index 1b95af3..52f283c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -613,8 +613,6 @@ struct address_space_operations { int (*error_remove_page)(struct address_space *, struct page *); }; -extern const struct address_space_operations empty_aops; - /* * pagecache_write_begin/pagecache_write_end must be used by general code * to write into the pagecache. -- 1.7.4.3