Re: 2.5.67-mm3

Andrew Morton (akpm@digeo.com)
Mon, 14 Apr 2003 21:31:14 -0700


William Lee Irwin III <wli@holomorphy.com> wrote:
>
> + for (; addr < (unsigned long)uaddr + size && !ret; addr += PAGE_SIZE)
> + ret = __put_user(0, (char *)max(addr, (unsigned long)uaddr));

This hurts my brain. If anything, it should be formulated as a do-while loop.

But I'm not sure we should really bother, because relatively large amounts of
stuff is broken for PAGE_SIZE != PAGE_CACHE_SIZE anyway. tmpfs comes to
mind...

If page clustering needs to redo this code (and I assume it does) then that
would be an argument in favour.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/