[lkml]   [2000]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: [PATCH 2.4.0-test8] mm/filemap.c
    >>>>> "bill" == Bill Wendling <> writes:


    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

    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
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:38    [W:0.021 / U:4.580 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site