From: Hugh Dickins <hugh.dickins@tiscali.co.uk>
To: Huang Shijie <shijie8@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH] remove unused line for mmap_region()
Date: Sun, 21 Jun 2009 19:30:51 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0906211917350.4583@sister.anvils> (raw)
In-Reply-To: <1245595421-3441-1-git-send-email-shijie8@gmail.com>
On Sun, 21 Jun 2009, Huang Shijie wrote:
> The variable pgoff is not used in the following codes.
> So, just remove the line.
>
> Signed-off-by: Huang Shijie <shijie8@gmail.com>
Hmm, hmm, well, I suppose a grudging Ack, though I'd happily be overruled.
Of course you are right, so why am I so reluctant to acknowledge it?
Because it's exceptional for addr and pgoff to be different after
coming back from the file's ->mmap method, and if someone adds a
use for pgoff lower down (there was, of course, a use for pgoff
in vma_merge lower down, until Linus moved that higher in 2.6.29),
it's a fair bet that they'll forget to restore the update you're
removing, and a fair bet that nobody will notice that it's gone
wrong for a while.
However, what would be likely to need pgoff lower down, other than
another attempt at vma_merge? And given how we're now working with
the vma_merge higher up (before pgoff had a chance to be adjusted),
I think we can conclude that anything needing to meddle with pgoff
would be setting some vm_flags that prevent merging anyway.
So I can just about bring myself to Ack your patch, but...
Hugh
> ---
> mm/mmap.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/mm/mmap.c b/mm/mmap.c
> index 34579b2..1dd6aaa 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -1210,7 +1210,6 @@ munmap_back:
> * f_op->mmap method. -DaveM
> */
> addr = vma->vm_start;
> - pgoff = vma->vm_pgoff;
> vm_flags = vma->vm_flags;
>
> if (vma_wants_writenotify(vma))
> --
> 1.6.0.6
--
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:[~2009-06-21 18:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-21 14:43 Huang Shijie
2009-06-21 18:30 ` Hugh Dickins [this message]
2009-06-22 3:50 ` Huang Shijie
2009-06-23 11:14 ` Hugh Dickins
2009-06-24 3:16 ` Huang Shijie
2009-06-24 4:22 ` 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=Pine.LNX.4.64.0906211917350.4583@sister.anvils \
--to=hugh.dickins@tiscali.co.uk \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=shijie8@gmail.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