[lc-checkins] CVS: linux/mm filemap.c,1.13,1.14
Status: Beta
Brought to you by:
nitin_sf
|
From: Rodrigo S. de C. <rc...@us...> - 2002-02-26 16:01:14
|
Update of /cvsroot/linuxcompressed/linux/mm
In directory usw-pr-cvs1:/tmp/cvs-serv24168/mm
Modified Files:
filemap.c
Log Message:
- Fixed annoying bug in the do_generic_file_read(). Wrong variable was sent
as parameter to lookup_comp_cache() which would not find or return the wrong
page.
- Fixed bug in truncate_inode_pages() to correctly truncate compressed
pages.
- Minor fixes regarding setting and clearing CompCache bit.
Index: filemap.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/filemap.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** filemap.c 25 Feb 2002 19:34:40 -0000 1.13
--- filemap.c 26 Feb 2002 16:01:10 -0000 1.14
***************
*** 207,210 ****
--- 207,212 ----
struct page * page;
+ invalidate_comp_pages(inode->i_mapping);
+
head = &inode->i_mapping->clean_pages;
***************
*** 355,360 ****
int unlocked;
- truncate_comp_pages(mapping, start, partial);
-
spin_lock(&pagecache_lock);
do {
--- 357,360 ----
***************
*** 365,368 ****
--- 365,370 ----
/* Traversed all three lists without dropping the lock */
spin_unlock(&pagecache_lock);
+
+ truncate_comp_pages(mapping, start, partial);
}
***************
*** 913,918 ****
spin_lock(&pagecache_lock);
page = __find_page_nolock(mapping, offset, *hash);
! if (page)
set_page_dirty(page);
spin_unlock(&pagecache_lock);
return page;
--- 915,922 ----
spin_lock(&pagecache_lock);
page = __find_page_nolock(mapping, offset, *hash);
! if (page) {
set_page_dirty(page);
+ PageSetCompCache(page);
+ }
spin_unlock(&pagecache_lock);
return page;
***************
*** 1602,1609 ****
cached_page = NULL;
! if (!lookup_comp_cache(mapping, offset, page)) {
! spin_lock(&pagecache_lock);
! goto found_page;
! }
goto readpage;
}
--- 1606,1611 ----
cached_page = NULL;
! if (!lookup_comp_cache(mapping, index, page))
! goto page_ok;
goto readpage;
}
|