Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

NeilBrown and committed by
Linus Torvalds
3978d717 5f921ae9

+7 -6
+1 -2
fs/buffer.c
··· 3007 3007 } 3008 3008 EXPORT_SYMBOL(try_to_free_buffers); 3009 3009 3010 - int block_sync_page(struct page *page) 3010 + void block_sync_page(struct page *page) 3011 3011 { 3012 3012 struct address_space *mapping; 3013 3013 ··· 3015 3015 mapping = page_mapping(page); 3016 3016 if (mapping) 3017 3017 blk_run_backing_dev(mapping->backing_dev_info, page); 3018 - return 0; 3019 3018 } 3020 3019 3021 3020 /*
+4 -2
fs/cifs/file.c
··· 1339 1339 return rc; 1340 1340 } 1341 1341 1342 - /* static int cifs_sync_page(struct page *page) 1342 + /* static void cifs_sync_page(struct page *page) 1343 1343 { 1344 1344 struct address_space *mapping; 1345 1345 struct inode *inode; ··· 1353 1353 return 0; 1354 1354 inode = mapping->host; 1355 1355 if (!inode) 1356 - return 0; */ 1356 + return; */ 1357 1357 1358 1358 /* fill in rpages then 1359 1359 result = cifs_pagein_inode(inode, index, rpages); */ /* BB finish */ 1360 1360 1361 1361 /* cFYI(1, ("rpages is %d for sync page of Index %ld ", rpages, index)); 1362 1362 1363 + #if 0 1363 1364 if (rc < 0) 1364 1365 return rc; 1365 1366 return 0; 1367 + #endif 1366 1368 } */ 1367 1369 1368 1370 /*
+1 -1
include/linux/buffer_head.h
··· 200 200 int generic_cont_expand(struct inode *inode, loff_t size); 201 201 int generic_cont_expand_simple(struct inode *inode, loff_t size); 202 202 int block_commit_write(struct page *page, unsigned from, unsigned to); 203 - int block_sync_page(struct page *); 203 + void block_sync_page(struct page *); 204 204 sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); 205 205 int generic_commit_write(struct file *, struct page *, unsigned, unsigned); 206 206 int block_truncate_page(struct address_space *, loff_t, get_block_t *);
+1 -1
include/linux/fs.h
··· 350 350 struct address_space_operations { 351 351 int (*writepage)(struct page *page, struct writeback_control *wbc); 352 352 int (*readpage)(struct file *, struct page *); 353 - int (*sync_page)(struct page *); 353 + void (*sync_page)(struct page *); 354 354 355 355 /* Write back some dirty pages from this mapping. */ 356 356 int (*writepages)(struct address_space *, struct writeback_control *);