From: Peter Chubb <peterc@gelato.unsw.edu.au>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: hugh@veritas.com, 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 08:48:33 +1000 [thread overview]
Message-ID: <87slbn64zi.wl%peterc@chubb.wattle.id.au> (raw)
In-Reply-To: <E1HWsJq-0000vz-00@dorka.pomaz.szeredi.hu>
>>>>> "Miklos" == Miklos Szeredi <miklos@szeredi.hu> writes:
>> + punch_hole = 0; } else {
>> - limit = (end + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
>> - if (limit > info->next_index)
>> - limit = info->next_index;
>> + 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.
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia
--
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>
next prev parent reply other threads:[~2007-03-29 22:48 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 [this message]
2007-03-30 4:01 ` Hugh Dickins
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=87slbn64zi.wl%peterc@chubb.wattle.id.au \
--to=peterc@gelato.unsw.edu.au \
--cc=akpm@linux-foundation.org \
--cc=hugh@veritas.com \
--cc=linux-mm@kvack.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
--cc=pbadari@us.ibm.com \
/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