From: Johannes Weiner <hannes@cmpxchg.org>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Oleg Nesterov <oleg@redhat.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
linux-mm@kvack.org
Subject: Re: [PATCH] tmpfs: change shmem_mapping() to test shmem_aops
Date: Wed, 14 Dec 2016 16:15:52 -0500 [thread overview]
Message-ID: <20161214211552.GA1796@cmpxchg.org> (raw)
In-Reply-To: <alpine.LSU.2.11.1612052148530.13021@eggly.anvils>
On Mon, Dec 05, 2016 at 09:52:36PM -0800, Hugh Dickins wrote:
> Callers of shmem_mapping() are interested in whether the mapping is
> swap backed - except for uprobes, which is interested in whether it
> should use shmem_read_mapping_page(). All these callers are better
> served by a shmem_mapping() which checks for shmem_aops, than the
> current version which goes through several indirections to find where
> the inode lives - and has the surprising effect that a private mmap of
> /dev/zero satisfies both vma_is_anonymous() and shmem_mapping(), when
> that device node is on devtmpfs. I don't think anything in the tree
> suffers from that surprise, but it caught me out, and is better fixed.
>
> Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
There are actually some existing sites that check for shmemness this
way. Do you see value in converting them?
---
prev parent reply other threads:[~2016-12-14 21:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 5:52 [PATCH] tmpfs: change shmem_mapping() to test shmem_aops Hugh Dickins
2016-12-14 21:15 ` Johannes Weiner [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=20161214211552.GA1796@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=oleg@redhat.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 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.