diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/inode.c | 9 | ||||
-rw-r--r-- | fs/nilfs2/page.c | 2 | ||||
-rw-r--r-- | fs/ubifs/xattr.c | 4 | ||||
-rw-r--r-- | fs/ufs/truncate.c | 1 |
4 files changed, 10 insertions, 6 deletions
diff --git a/fs/inode.c b/fs/inode.c index 5f4e11aaeb5c..33c963d08ab4 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -125,6 +125,14 @@ __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_wb_list_lock); | |||
125 | static DECLARE_RWSEM(iprune_sem); | 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 | * Statistics gathering.. | 136 | * Statistics gathering.. |
129 | */ | 137 | */ |
130 | struct inodes_stat_t inodes_stat; | 138 | struct inodes_stat_t inodes_stat; |
@@ -176,7 +184,6 @@ int proc_nr_inodes(ctl_table *table, int write, | |||
176 | */ | 184 | */ |
177 | int inode_init_always(struct super_block *sb, struct inode *inode) | 185 | int inode_init_always(struct super_block *sb, struct inode *inode) |
178 | { | 186 | { |
179 | static const struct address_space_operations empty_aops; | ||
180 | static const struct inode_operations empty_iops; | 187 | static const struct inode_operations empty_iops; |
181 | static const struct file_operations empty_fops; | 188 | static const struct file_operations empty_fops; |
182 | struct address_space *const mapping = &inode->i_data; | 189 | struct address_space *const mapping = &inode->i_data; |
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index 9d2dc6b4348e..1168059c7efd 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c | |||
@@ -495,8 +495,6 @@ unsigned nilfs_page_count_clean_buffers(struct page *page, | |||
495 | void nilfs_mapping_init(struct address_space *mapping, | 495 | void nilfs_mapping_init(struct address_space *mapping, |
496 | struct backing_dev_info *bdi) | 496 | struct backing_dev_info *bdi) |
497 | { | 497 | { |
498 | static const struct address_space_operations empty_aops; | ||
499 | |||
500 | mapping->host = NULL; | 498 | mapping->host = NULL; |
501 | mapping->flags = 0; | 499 | mapping->flags = 0; |
502 | mapping_set_gfp_mask(mapping, GFP_NOFS); | 500 | mapping_set_gfp_mask(mapping, GFP_NOFS); |
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c index c74400f88fe0..3299f469e712 100644 --- a/fs/ubifs/xattr.c +++ b/fs/ubifs/xattr.c | |||
@@ -56,6 +56,7 @@ | |||
56 | */ | 56 | */ |
57 | 57 | ||
58 | #include "ubifs.h" | 58 | #include "ubifs.h" |
59 | #include <linux/fs.h> | ||
59 | #include <linux/slab.h> | 60 | #include <linux/slab.h> |
60 | #include <linux/xattr.h> | 61 | #include <linux/xattr.h> |
61 | #include <linux/posix_acl_xattr.h> | 62 | #include <linux/posix_acl_xattr.h> |
@@ -80,7 +81,6 @@ enum { | |||
80 | }; | 81 | }; |
81 | 82 | ||
82 | static const struct inode_operations none_inode_operations; | 83 | static const struct inode_operations none_inode_operations; |
83 | static const struct address_space_operations none_address_operations; | ||
84 | static const struct file_operations none_file_operations; | 84 | static const struct file_operations none_file_operations; |
85 | 85 | ||
86 | /** | 86 | /** |
@@ -130,7 +130,7 @@ static int create_xattr(struct ubifs_info *c, struct inode *host, | |||
130 | } | 130 | } |
131 | 131 | ||
132 | /* Re-define all operations to be "nothing" */ | 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 | inode->i_op = &none_inode_operations; | 134 | inode->i_op = &none_inode_operations; |
135 | inode->i_fop = &none_file_operations; | 135 | inode->i_fop = &none_file_operations; |
136 | 136 | ||
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index 11014302c9ca..5f821dbc0579 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c | |||
@@ -479,7 +479,6 @@ int ufs_truncate(struct inode *inode, loff_t old_i_size) | |||
479 | break; | 479 | break; |
480 | if (IS_SYNC(inode) && (inode->i_state & I_DIRTY)) | 480 | if (IS_SYNC(inode) && (inode->i_state & I_DIRTY)) |
481 | ufs_sync_inode (inode); | 481 | ufs_sync_inode (inode); |
482 | blk_flush_plug(current); | ||
483 | yield(); | 482 | yield(); |
484 | } | 483 | } |
485 | 484 | ||