lkml.org 
[lkml]   [2000]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2.4.0-test8] mm/filemap.c
From
Date
>>>>> "bill" == Bill Wendling <wendling@ganymede.isdn.uiuc.edu> writes:

Hi

Linus, please don't apply.

bill> - The `head = &mapping->pages;' statement is useless inside the
bill> repeat, since head isn't modified inside the loop.

No, but we sleep inside the loop, and while we sleep, we don't have
locked the page cache :((((
bill> - The `curr = curr->next;' statement doesn't need to be executed
bill> if the repeat is taken. I changed the while() into a for() loop
bill> to accomodate this better.
If you think that the for is nicer (I think that the while is easier
to read, but that is question of taste).

Later, Juan.


bill> Share and enjoy!

bill> --
bill> || Bill Wendling wendling@ganymede.isdn.uiuc.edu
bill> --- linux-2.4.0-test8/mm/filemap.c Sat Sep 9 02:35:09 2000
bill> +++ linux-2.4.0-test8-new/mm/filemap.c Thu Sep 14 03:14:06 2000
bill> @@ -189,16 +189,14 @@
bill> unsigned long start;

bill> start = (lstart + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
bill> + head = &mapping->pages;

bill> repeat:
bill> - head = &mapping->pages;
bill> spin_lock(&pagecache_lock);
bill> - curr = head->next;
bill> - while (curr != head) {
bill> + for (curr = head->next; curr != head; curr = curr->next) {
bill> unsigned long offset;
bill> page = list_entry(curr, struct page, list);
bill> - curr = curr->next;
bill> offset = page->index;

bill> /* Is one of the pages to truncate? */
--
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.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.410 / U:0.736 seconds]
©2003-2014 Jasper Spaans. Advertise on this site