提交 3978d717 编写于 作者: N NeilBrown 提交者: Linus Torvalds

[PATCH] Make address_space_operations->sync_page return void

The only user ignores the return value, and the only instanace
(block_sync_page) always returns 0...
Signed-off-by: NNeil Brown <neilb@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 5f921ae9
...@@ -3007,7 +3007,7 @@ int try_to_free_buffers(struct page *page) ...@@ -3007,7 +3007,7 @@ int try_to_free_buffers(struct page *page)
} }
EXPORT_SYMBOL(try_to_free_buffers); EXPORT_SYMBOL(try_to_free_buffers);
int block_sync_page(struct page *page) void block_sync_page(struct page *page)
{ {
struct address_space *mapping; struct address_space *mapping;
...@@ -3015,7 +3015,6 @@ int block_sync_page(struct page *page) ...@@ -3015,7 +3015,6 @@ int block_sync_page(struct page *page)
mapping = page_mapping(page); mapping = page_mapping(page);
if (mapping) if (mapping)
blk_run_backing_dev(mapping->backing_dev_info, page); blk_run_backing_dev(mapping->backing_dev_info, page);
return 0;
} }
/* /*
......
...@@ -1339,7 +1339,7 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync) ...@@ -1339,7 +1339,7 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync)
return rc; return rc;
} }
/* static int cifs_sync_page(struct page *page) /* static void cifs_sync_page(struct page *page)
{ {
struct address_space *mapping; struct address_space *mapping;
struct inode *inode; struct inode *inode;
...@@ -1353,16 +1353,18 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync) ...@@ -1353,16 +1353,18 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync)
return 0; return 0;
inode = mapping->host; inode = mapping->host;
if (!inode) if (!inode)
return 0; */ return; */
/* fill in rpages then /* fill in rpages then
result = cifs_pagein_inode(inode, index, rpages); */ /* BB finish */ result = cifs_pagein_inode(inode, index, rpages); */ /* BB finish */
/* cFYI(1, ("rpages is %d for sync page of Index %ld ", rpages, index)); /* cFYI(1, ("rpages is %d for sync page of Index %ld ", rpages, index));
#if 0
if (rc < 0) if (rc < 0)
return rc; return rc;
return 0; return 0;
#endif
} */ } */
/* /*
......
...@@ -200,7 +200,7 @@ int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*, ...@@ -200,7 +200,7 @@ int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*,
int generic_cont_expand(struct inode *inode, loff_t size); int generic_cont_expand(struct inode *inode, loff_t size);
int generic_cont_expand_simple(struct inode *inode, loff_t size); int generic_cont_expand_simple(struct inode *inode, loff_t size);
int block_commit_write(struct page *page, unsigned from, unsigned to); int block_commit_write(struct page *page, unsigned from, unsigned to);
int block_sync_page(struct page *); void block_sync_page(struct page *);
sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *);
int generic_commit_write(struct file *, struct page *, unsigned, unsigned); int generic_commit_write(struct file *, struct page *, unsigned, unsigned);
int block_truncate_page(struct address_space *, loff_t, get_block_t *); int block_truncate_page(struct address_space *, loff_t, get_block_t *);
......
...@@ -350,7 +350,7 @@ struct writeback_control; ...@@ -350,7 +350,7 @@ struct writeback_control;
struct address_space_operations { struct address_space_operations {
int (*writepage)(struct page *page, struct writeback_control *wbc); int (*writepage)(struct page *page, struct writeback_control *wbc);
int (*readpage)(struct file *, struct page *); int (*readpage)(struct file *, struct page *);
int (*sync_page)(struct page *); void (*sync_page)(struct page *);
/* Write back some dirty pages from this mapping. */ /* Write back some dirty pages from this mapping. */
int (*writepages)(struct address_space *, struct writeback_control *); int (*writepages)(struct address_space *, struct writeback_control *);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册