]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[PATCH] Make address_space_operations->sync_page return void
authorNeilBrown <neilb@suse.de>
Sun, 26 Mar 2006 09:37:17 +0000 (01:37 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 26 Mar 2006 16:56:55 +0000 (08:56 -0800)
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>
fs/buffer.c
fs/cifs/file.c
include/linux/buffer_head.h
include/linux/fs.h

index 3b3ab5281920ca00954ad38bbc2f8911fa4d18cf..0b9456fd074f67c1b87861c444a9bfc20a4caf54 100644 (file)
@@ -3007,7 +3007,7 @@ out:
 }
 EXPORT_SYMBOL(try_to_free_buffers);
 
-int block_sync_page(struct page *page)
+void block_sync_page(struct page *page)
 {
        struct address_space *mapping;
 
@@ -3015,7 +3015,6 @@ int block_sync_page(struct page *page)
        mapping = page_mapping(page);
        if (mapping)
                blk_run_backing_dev(mapping->backing_dev_info, page);
-       return 0;
 }
 
 /*
index 165d67426381df8aa814ba904266b2b227da1980..fb49aef1f2ecd9ca3a90d961bcf175e5d5e1f928 100644 (file)
@@ -1339,7 +1339,7 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync)
        return rc;
 }
 
-/* static int cifs_sync_page(struct page *page)
+/* static void cifs_sync_page(struct page *page)
 {
        struct address_space *mapping;
        struct inode *inode;
@@ -1353,16 +1353,18 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync)
                return 0;
        inode = mapping->host;
        if (!inode)
-               return 0; */
+               return; */
 
 /*     fill in rpages then 
        result = cifs_pagein_inode(inode, index, rpages); */ /* BB finish */
 
 /*     cFYI(1, ("rpages is %d for sync page of Index %ld ", rpages, index));
 
+#if 0
        if (rc < 0)
                return rc;
        return 0;
+#endif
 } */
 
 /*
index 9f159baf153fbcc12a4c7889d92597e35d205391..27dd97b3fce9eaeb96345dc457e2963552049636 100644 (file)
@@ -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_simple(struct inode *inode, loff_t size);
 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 *);
 int generic_commit_write(struct file *, struct page *, unsigned, unsigned);
 int block_truncate_page(struct address_space *, loff_t, get_block_t *);
index 5adf32b90f362643e6e4fe9dd5e4fec41f121ad8..972435d4df5c25d8bc8fa795c868658655840ad2 100644 (file)
@@ -350,7 +350,7 @@ struct writeback_control;
 struct address_space_operations {
        int (*writepage)(struct page *page, struct writeback_control *wbc);
        int (*readpage)(struct file *, struct page *);
-       int (*sync_page)(struct page *);
+       void (*sync_page)(struct page *);
 
        /* Write back some dirty pages from this mapping. */
        int (*writepages)(struct address_space *, struct writeback_control *);