OSDN Git Service

shmem: convert shmem_write_end() to use a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 12 Jan 2023 13:10:31 +0000 (13:10 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:33:03 +0000 (22:33 -0800)
commit69bbb87b3f144e4778f028fd85992aa8dea6ff28
tree93aedc7ff9890816e9a6a413431e4ce2d8f4315e
parenta6fddef49eef2cf68c23e91d73d6a6d5e2cd448f
shmem: convert shmem_write_end() to use a folio

Use a folio internally to shmem_write_end() which saves a number of calls
to compound_head() and lets us get rid of the custom code to zero out the
rest of a THP and supports folios of arbitrary size.

Link: https://lkml.kernel.org/r/20230112131031.1209553-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shmem.c