[lkml]   [2001]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] truncate_inode_pages
On Sunday 10 June 2001 03:31, Andrew Morton wrote:
> Daniel Phillips wrote:
> > This is easy, just set the list head to the page about to be truncated.
> Works for me.

It looks good, but it's black magic - it could use a comment along the lines

* Ensure at least one pass through all three lists with lock held

There is some fuzz on the original code that could use a scrubbing. "start"
should not be the 1st full page needing truncating, it should be the first
page needing truncating at all, full or partial.

The truncation condition becomes:

- if ((offset >= start) || (*partial && (offset + 1) == start)) {
+ if (offset >= start) {
- if (*partial && (offset + 1) == start)
+ if (*partial && offset == start)

Then the conditions are so easy to test it's not worth passing the &partial,
just pass lstart... and... oh bother, it's not broke, why fix it ;-)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:55    [W:0.060 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site