Re: [PATCH 2.4.0-test8] mm/filemap.c

From: Bill Wendling (wendling@ganymede.isdn.uiuc.edu)
Date: Thu Sep 14 2000 - 12:12:17 EST


Also sprach Juan J. Quintela:
} >>>>> "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 :((((
}
As David pointed out, it's only necessary if mapping->pages changes. But,
then, shouldn't the head = &mapping->pages statement be within the
spinlock?

} If you think that the for is nicer (I think that the while is easier
} to read, but that is question of taste).
}
It's not really a question of taste. The for loop does the increment
after the block of code. Doing it beforehand is a waste if the repeat is
taken.

Attached is a new patch which just addresses this issue and leaves the
head = &mapping->pages thingy alone...

-- 
|| Bill Wendling			wendling@ganymede.isdn.uiuc.edu


- 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/



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:24 EST