]> www.infradead.org Git - users/jedix/linux-maple.git/commit
filemap: remove redundant folio_test_large check in filemap_free_folio
authorGuanjun <guanjun@linux.alibaba.com>
Thu, 13 Feb 2025 05:56:12 +0000 (13:56 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 4 Mar 2025 05:49:53 +0000 (21:49 -0800)
commit528642049f465c5c4593d0e1e09f178c272cd96a
tree629d4b2a1ce545b158b5c0d33f8a1841dbe045a8
parentb639a6070afcf0c6006a3a9d64c26708461e32a2
filemap: remove redundant folio_test_large check in filemap_free_folio

The folio_test_large() check in filemap_free_folio() is unnecessary
because folio_nr_pages(), which is called internally already performs this
check.  Removing the redundant condition simplifies the code and avoids
double validation.

This change improves code readability and reduces unnecessary operations
in the folio freeing path.

Link: https://lkml.kernel.org/r/20250213055612.490993-1-guanjun@linux.alibaba.com
Signed-off-by: Guanjun <guanjun@linux.alibaba.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/filemap.c