]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: Convert get_page_unless_zero() to return bool
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 6 Jun 2021 03:20:17 +0000 (23:20 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 13 Aug 2021 18:17:50 +0000 (14:17 -0400)
commit3fe8394274398560d281820caafcc59f70f863f1
tree8558e484b105a31b7cb93945312dbc8d0aeae880
parentf0eb870a84224c9bfde0dc547927e8df1be4267c
mm: Convert get_page_unless_zero() to return bool

atomic_add_unless() returns bool, so remove the widening casts to int
in page_ref_add_unless() and get_page_unless_zero().  This causes gcc
to produce slightly larger code in isolate_migratepages_block(), but
it's not clear that it's worse code.  Net +19 bytes of text.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
include/linux/mm.h
include/linux/page_ref.h