From: Martin Oliveira <martin.oliveira@eideticom.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-rdma@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Artemy Kovalyov <artemyko@nvidia.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
Logan Gunthorpe <logang@deltatee.com>,
Michael Guralnik <michaelgur@nvidia.com>,
Mike Marciniszyn <mike.marciniszyn@intel.com>,
Tejun Heo <tj@kernel.org>, John Hubbard <jhubbard@nvidia.com>,
Dan Williams <dan.j.williams@intel.com>,
David Sloan <david.sloan@eideticom.com>
Subject: Re: [PATCH v3 1/3] kernfs: remove page_mkwrite() from vm_operations_struct
Date: Thu, 4 Jul 2024 14:43:04 -0600 [thread overview]
Message-ID: <310071c8-04b7-4996-a496-614c2bdb8163@eideticom.com> (raw)
In-Reply-To: <ZobVol_trCwtwjK4@casper.infradead.org>
On 2024-07-04 11:02, Matthew Wilcox wrote:> Seems to me we should actually _handle_ that, not do something wrong.
> eg:
>
> if (vma->vm_ops) {
> if (vma->vm_ops->close)
> goto out_put;
> if (WARN_ON(vma->vm_ops->page_mkwrite))
> goto out_put;
> }
Good point.
> or maybe this doesn't need to be a WARN at all? After all, there
> isn't one for having a ->close method, so why is page_mkwrite special?
Hmm yeah, they should probably be treated the same.
Maybe ->close should be converted to WARN as well? It would be easier to
catch an error this way than chasing the EINVAL, but I'm OK either way.
Thanks,
Martin
next prev parent reply other threads:[~2024-07-04 20:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 16:37 [PATCH v3 0/3] Enable P2PDMA in Userspace RDMA Martin Oliveira
2024-07-04 16:37 ` [PATCH v3 1/3] kernfs: remove page_mkwrite() from vm_operations_struct Martin Oliveira
2024-07-04 16:48 ` Greg Kroah-Hartman
2024-07-04 17:02 ` Matthew Wilcox
2024-07-04 20:43 ` Martin Oliveira [this message]
2024-07-05 7:20 ` Christoph Hellwig
2024-07-08 16:31 ` Martin Oliveira
2024-07-04 16:37 ` [PATCH v3 2/3] mm/gup: allow FOLL_LONGTERM & FOLL_PCI_P2PDMA Martin Oliveira
2024-07-04 16:37 ` [PATCH v3 3/3] RDMA/umem: add support for P2P RDMA Martin Oliveira
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=310071c8-04b7-4996-a496-614c2bdb8163@eideticom.com \
--to=martin.oliveira@eideticom.com \
--cc=akpm@linux-foundation.org \
--cc=artemyko@nvidia.com \
--cc=dan.j.williams@intel.com \
--cc=david.sloan@eideticom.com \
--cc=gregkh@linuxfoundation.org \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rdma@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=michaelgur@nvidia.com \
--cc=mike.marciniszyn@intel.com \
--cc=tj@kernel.org \
--cc=willy@infradead.org \
/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