Thread (15 messages) 15 messages, 5 authors, 2018-03-08

[PATCH 1/2] mm/vmalloc: Add interfaces to free unused page table

From: willy@infradead.org (Matthew Wilcox)
Date: 2018-03-08 22:07:11
Also in: linux-mm, lkml

On Thu, Mar 08, 2018 at 03:56:30PM +0000, Kani, Toshi wrote:
On Wed, 2018-03-07 at 20:00 -0800, Matthew Wilcox wrote:
quoted
On Wed, Mar 07, 2018 at 11:32:26AM -0700, Toshi Kani wrote:
quoted
+/**
+ * pud_free_pmd_page - clear pud entry and free pmd page
+ *
+ * Returns 1 on success and 0 on failure (pud not cleared).
+ */
+int pud_free_pmd_page(pud_t *pud)
+{
+	return pud_none(*pud);
+}
Wouldn't it be clearer if you returned 'bool' instead of 'int' here?
I thought about it and decided to use 'int' since all other pud/pmd/pte
interfaces, such as pud_none() above, use 'int'.
These interfaces were introduced before we had bool ... I suspect nobody's
taken the time to go through and convert them all.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help