linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: linux-mm@kvack.org, Uladzislau Rezki <urezki@gmail.com>,
	David Howells <dhowells@redhat.com>,
	Dave Chinner <david@fromorbit.com>,
	linux-fsdevel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ira Weiny <ira.weiny@intel.com>,
	"Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
	Luis Chamberlain <mcgrof@kernel.org>
Subject: Re: [PATCH v2 2/2] mm: Add folio_map_local()
Date: Wed, 2 Nov 2022 02:13:14 -0700	[thread overview]
Message-ID: <Y2I0qiQaSHyL3kqW@infradead.org> (raw)
In-Reply-To: <20221101201828.1170455-3-willy@infradead.org>

> +void *vm_map_folio(struct folio *folio)
> +{
> +	size_t size = folio_size(folio);
> +	void *mem = vmap_alloc(size, NUMA_NO_NODE);

Needs an error check here.

> +	mem = kasan_unpoison_vmalloc(mem, size, KASAN_VMALLOC_PROT_NORMAL);
> +
> +	return mem;

Why not:

	return kasan_unpoison_vmalloc(mem, size, KASAN_VMALLOC_PROT_NORMAL);

> +EXPORT_SYMBOL(vm_map_folio);

All new vmalloc/vmap functionality should be EXPORT_SYMBOL_GPL.

      reply	other threads:[~2022-11-02  9:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01 20:18 [PATCH v2 0/2] Mapping an entire folio Matthew Wilcox (Oracle)
2022-11-01 20:18 ` [PATCH v2 1/2] vmalloc: Factor vmap_alloc() out of vm_map_ram() Matthew Wilcox (Oracle)
2022-11-02  3:46   ` Hyeonggon Yoo
2022-11-02  3:59   ` Hyeonggon Yoo
2022-11-02  9:10   ` Christoph Hellwig
2022-11-01 20:18 ` [PATCH v2 2/2] mm: Add folio_map_local() Matthew Wilcox (Oracle)
2022-11-02  9:13   ` Christoph Hellwig [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=Y2I0qiQaSHyL3kqW@infradead.org \
    --to=hch@infradead.org \
    --cc=david@fromorbit.com \
    --cc=dhowells@redhat.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mcgrof@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=urezki@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).