]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/memory.c
mm: write_cache_pages terminate quickly
[karo-tx-linux.git] / mm / memory.c
index 0a2010a9518c499efe694c9ed0d42f5bd18e459b..5e0e91cc6b67a895a2ca2c9101113f2a89877cc2 100644 (file)
@@ -768,7 +768,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
                                if (pte_dirty(ptent))
                                        set_page_dirty(page);
                                if (pte_young(ptent))
-                                       SetPageReferenced(page);
+                                       mark_page_accessed(page);
                                file_rss--;
                        }
                        page_remove_rmap(page, vma);
@@ -2266,7 +2266,7 @@ int vmtruncate(struct inode * inode, loff_t offset)
                unmap_mapping_range(mapping, offset + PAGE_SIZE - 1, 0, 1);
        }
 
-       if (inode->i_op && inode->i_op->truncate)
+       if (inode->i_op->truncate)
                inode->i_op->truncate(inode);
        return 0;
 
@@ -2286,7 +2286,7 @@ int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end)
         * a way to truncate a range of blocks (punch a hole) -
         * we should return failure right now.
         */
-       if (!inode->i_op || !inode->i_op->truncate_range)
+       if (!inode->i_op->truncate_range)
                return -ENOSYS;
 
        mutex_lock(&inode->i_mutex);