From: Hugh Dickins <hugh@veritas.com>
To: Peter Chubb <peterc@gelato.unsw.edu.au>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
akpm@linux-foundation.org, mszeredi@suse.cz, pbadari@us.ibm.com,
linux-mm@kvack.org
Subject: Re: [PATCH 1/4] holepunch: fix shmem_truncate_range punching too far
Date: Fri, 30 Mar 2007 05:01:49 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0703300458060.32407@blonde.wat.veritas.com> (raw)
In-Reply-To: <87slbn64zi.wl%peterc@chubb.wattle.id.au>
On Fri, 30 Mar 2007, Peter Chubb wrote:
> >> + if (end + 1 >= inode->i_size) { /* we may free a little more */
>
> Miklos> Why end + 1? If the hole end is at 4096 and the file size is
> Miklos> 4097 we surely don't want to truncate that second page also?
>
> Why not simplify it to end > inode->i_size? I think it then makes
> more sense.
One reason would be, that 2 + 1 >= 3, but I don't think 2 > 3 ;)
Hugh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2007-03-30 4:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-28 14:50 Hugh Dickins
2007-03-28 14:51 ` [PATCH 2/4] holepunch: fix shmem_truncate_range punch locking Hugh Dickins
2007-03-29 11:32 ` Miklos Szeredi
2007-03-28 14:52 ` [PATCH 3/4] holepunch: fix disconnected pages after second truncate Hugh Dickins
2007-03-28 14:54 ` [PATCH 4/4] holepunch: fix mmap_sem i_mutex deadlock Hugh Dickins
2007-03-29 10:57 ` [PATCH 1/4] holepunch: fix shmem_truncate_range punching too far Miklos Szeredi
2007-03-29 11:56 ` Hugh Dickins
2007-03-29 12:11 ` Miklos Szeredi
2007-03-29 13:39 ` Hugh Dickins
2007-03-29 14:35 ` Miklos Szeredi
2007-03-29 22:48 ` Peter Chubb
2007-03-30 4:01 ` Hugh Dickins [this message]
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=Pine.LNX.4.64.0703300458060.32407@blonde.wat.veritas.com \
--to=hugh@veritas.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
--cc=pbadari@us.ibm.com \
--cc=peterc@gelato.unsw.edu.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox