[PATCH] mark address_space_operations const
[deliverable/linux.git] / fs / afs / file.c
index 150b192279228a3dfee74846a6f8f48d38e933fd..67d6634101fdcc81e75787c87d8084f5c13256c9 100644 (file)
@@ -28,14 +28,14 @@ static int afs_file_release(struct inode *inode, struct file *file);
 #endif
 
 static int afs_file_readpage(struct file *file, struct page *page);
-static int afs_file_invalidatepage(struct page *page, unsigned long offset);
+static void afs_file_invalidatepage(struct page *page, unsigned long offset);
 static int afs_file_releasepage(struct page *page, gfp_t gfp_flags);
 
 struct inode_operations afs_file_inode_operations = {
        .getattr        = afs_inode_getattr,
 };
 
-struct address_space_operations afs_fs_aops = {
+const struct address_space_operations afs_fs_aops = {
        .readpage       = afs_file_readpage,
        .sync_page      = block_sync_page,
        .set_page_dirty = __set_page_dirty_nobuffers,
@@ -212,7 +212,7 @@ int afs_cache_get_page_cookie(struct page *page,
 /*
  * invalidate part or all of a page
  */
-static int afs_file_invalidatepage(struct page *page, unsigned long offset)
+static void afs_file_invalidatepage(struct page *page, unsigned long offset)
 {
        int ret = 1;
 
@@ -238,11 +238,11 @@ static int afs_file_invalidatepage(struct page *page, unsigned long offset)
                        if (!PageWriteback(page))
                                ret = page->mapping->a_ops->releasepage(page,
                                                                        0);
+                       /* possibly should BUG_ON(!ret); - neilb */
                }
        }
 
        _leave(" = %d", ret);
-       return ret;
 } /* end afs_file_invalidatepage() */
 
 /*****************************************************************************/
This page took 0.029311 seconds and 5 git commands to generate.