Update of /cvsroot/linuxcompressed/linux/mm
In directory usw-pr-cvs1:/tmp/cvs-serv26862/mm
Modified Files:
filemap.c swap_state.c
Log Message:
- Cleanups in comp_cache/main.c
- Fix to make filemap_fdatawait() to wait for compressed pages being written
out.
Index: filemap.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/filemap.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** filemap.c 27 Feb 2002 14:16:52 -0000 1.16
--- filemap.c 27 Feb 2002 19:58:51 -0000 1.17
***************
*** 626,633 ****
}
spin_unlock(&pagecache_lock);
-
- /* In the case we sleep to get the locks above, some pages
- * might get compressed. It may also happen to compress dirty
- * pages when allocating new pages in the first loop. */
if (there_are_dirty_comp_pages(mapping))
goto try_again;
--- 626,629 ----
***************
*** 646,649 ****
--- 642,648 ----
int ret = 0;
+ try_again:
+ wait_all_comp_pages(mapping);
+
spin_lock(&pagecache_lock);
***************
*** 668,671 ****
--- 667,672 ----
}
spin_unlock(&pagecache_lock);
+ if (there_are_locked_comp_pages(mapping))
+ goto try_again;
return ret;
}
Index: swap_state.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/swap_state.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** swap_state.c 25 Feb 2002 19:34:41 -0000 1.23
--- swap_state.c 27 Feb 2002 19:58:51 -0000 1.24
***************
*** 42,50 ****
LIST_HEAD_INIT(swapper_space.clean_pages),
LIST_HEAD_INIT(swapper_space.dirty_pages),
#ifdef CONFIG_COMP_CACHE
LIST_HEAD_INIT(swapper_space.clean_comp_pages),
LIST_HEAD_INIT(swapper_space.dirty_comp_pages),
#endif
- LIST_HEAD_INIT(swapper_space.locked_pages),
0, /* nrpages */
&swap_aops,
--- 42,51 ----
LIST_HEAD_INIT(swapper_space.clean_pages),
LIST_HEAD_INIT(swapper_space.dirty_pages),
+ LIST_HEAD_INIT(swapper_space.locked_pages),
#ifdef CONFIG_COMP_CACHE
LIST_HEAD_INIT(swapper_space.clean_comp_pages),
LIST_HEAD_INIT(swapper_space.dirty_comp_pages),
+ LIST_HEAD_INIT(swapper_space.locked_comp_pages),
#endif
0, /* nrpages */
&swap_aops,
|