diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
commit | 482368b1a8e45430672c58c9a42e7d2004367126 (patch) | |
tree | ce2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /mm/filemap.c | |
parent | e4d0251c6f56ab2e191afb70f80f382793e23f74 (diff) |
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 4772ed254..749e14250 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -124,7 +124,7 @@ void invalidate_inode_pages(struct inode * inode) * Truncate the page cache at a set offset, removing the pages * that are beyond that offset (and zeroing out partial pages). */ -void truncate_inode_pages(struct inode * inode, loff_t lstart) +void truncate_inode_pages(struct address_space * mapping, loff_t lstart) { struct list_head *head, *curr; struct page * page; @@ -134,7 +134,7 @@ void truncate_inode_pages(struct inode * inode, loff_t lstart) start = (lstart + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; repeat: - head = &inode->i_mapping->pages; + head = &mapping->pages; spin_lock(&pagecache_lock); curr = head->next; while (curr != head) { @@ -479,8 +479,8 @@ static inline void __add_to_page_cache(struct page * page, struct page *alias; unsigned long flags; - flags = page->flags & ~((1 << PG_uptodate) | (1 << PG_error) | (1 << PG_referenced)); - page->flags = flags | (1 << PG_locked); + flags = page->flags & ~((1 << PG_uptodate) | (1 << PG_error)); + page->flags = flags | (1 << PG_locked) | (1 << PG_referenced); get_page(page); page->index = offset; add_page_to_inode_queue(mapping, page); @@ -1945,8 +1945,6 @@ generic_file_write(struct file *file,const char *buf,size_t count,loff_t *ppos) count -= status; pos += status; buf += status; - if (pos > inode->i_size) - inode->i_size = pos; } unlock: /* Mark it unlocked again and drop the page.. */ |