Re: Fixing invalidate_inode_pages() and mmapped files...

From: Juan J. Quintela (quintela@fi.udc.es)
Date: Mon May 15 2000 - 04:31:18 EST


>>>>> "trond" == Trond Myklebust <trond.myklebust@fys.uio.no> writes:

Hi

        please, use the page_count macro for this
 
trond> @@ -132,7 +132,18 @@
trond> page = list_entry(curr, struct page, list);
trond> curr = curr->next;
 
trond> - /* We cannot invalidate a locked page */
trond> + /*
trond> + * All pages are marked as being not up to date
trond> + * even locked ones (otherwise we have a race with
trond> + * generic_file_write()).
trond> + */
trond> + ClearPageUptodate(page);
trond> +
trond> + /* We cannot remove an mmapped page */
trond> + if (atomic_read(&page->count) > 1)
       + if (page_count(page) > 1)
                        
trond> + continue;
trond> +
trond> + /* We cannot remove a locked page */
trond> if (TryLockPage(page))
trond> continue;
 
Thanks, Juan.

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:25 EST