From: Daniel Phillips <phillips@bonn-fries.net>
To: Andrew Morton <andrewm@uow.edu.au>
Cc: Alexander Viro <viro@math.psu.edu>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] truncate_inode_pages
Date: Sun, 10 Jun 2001 18:40:23 +0200 [thread overview]
Message-ID: <01061018402300.05248@starship> (raw)
In-Reply-To: <Pine.GSO.4.21.0106091331120.19361-100000@weyl.math.psu.edu> <01061000533601.03897@starship> <3B22CDFA.2BC46385@uow.edu.au>
In-Reply-To: <3B22CDFA.2BC46385@uow.edu.au>
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
of:
/*
* 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 ;-)
--
Daniel
next prev parent reply other threads:[~2001-06-10 16:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-09 15:51 [patch] truncate_inode_pages Andrew Morton
2001-06-09 17:40 ` Alexander Viro
2001-06-09 22:53 ` Daniel Phillips
2001-06-10 1:31 ` Andrew Morton
2001-06-10 16:40 ` Daniel Phillips [this message]
2001-06-11 12:45 ` Andrew Morton
2001-06-11 13:13 ` Daniel Phillips
2001-06-11 13:28 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2001-06-11 2:22 Dieter Nützel
[not found] ` <200106112252.AAA19615@mail.bonn-fries.net>
[not found] ` <01061214324600.00879@starship>
2001-06-12 16:32 ` Dieter Nützel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01061018402300.05248@starship \
--to=phillips@bonn-fries.net \
--cc=andrewm@uow.edu.au \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@math.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.