-static void setup_aops(struct inode *cache_inode,
- struct address_space_operations *aops,
- struct address_space_operations *cache_aops)
-{
- if (cache_inode && cache_inode->i_mapping &&
- aops && cache_aops) {
- struct address_space_operations *caops = cache_inode->i_mapping->a_ops;
-
- if (caops->writepage)
- aops->writepage = cache_aops->writepage;
- if (caops->readpage)
- aops->readpage = cache_aops->readpage;
- if (caops->sync_page)
- aops->sync_page = cache_aops->sync_page;
- if (caops->prepare_write)
- aops->prepare_write = cache_aops->prepare_write;
- if (caops->commit_write)
- aops->commit_write = cache_aops->commit_write;
- if (caops->bmap)
- aops->bmap = cache_aops->bmap;
- if (caops->flushpage)
- aops->flushpage = cache_aops->flushpage;
- if (caops->releasepage)
- aops->releasepage = cache_aops->releasepage;
- if (caops->direct_IO)
- aops->direct_IO = cache_aops->direct_IO;
- if (caops->removepage)
- aops->removepage = cache_aops->removepage;
- }
-};
-