]> git.baikalelectronics.ru Git - kernel.git/commit
filemap: Use folio_put_refs() in filemap_free_folio()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 7 Jan 2022 18:03:48 +0000 (13:03 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 17 Jan 2022 00:52:13 +0000 (19:52 -0500)
commite31661ac935d05f63ceaa0a0adef6ac2f6d93adf
treeadf821b3c695ef24657260198778ec956a7e4c63
parent52ffa20f10c5266157dc1a5aa99ba6a2495043c1
filemap: Use folio_put_refs() in filemap_free_folio()

This shrinks filemap_free_folio() by 55 bytes in my .config; 24 bytes
from removing the VM_BUG_ON_FOLIO() and 31 bytes from unifying the
small/large folio paths.

We could just use folio_ref_sub() here since the caller should hold a
reference (as the VM_BUG_ON_FOLIO() was asserting), but that's fragile.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
mm/filemap.c