nilfs2: convert nilfs_lookup_dirty_data_buffers to use folio_create_empty_buffers
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 16 Oct 2023 20:11:03 +0000 (21:11 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 25 Oct 2023 23:47:09 +0000 (16:47 -0700)
This function was already using a folio, so this update to the new API
removes a single folio->page->folio conversion.

Link: https://lkml.kernel.org/r/20231016201114.1928083-17-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Pankaj Raghav <p.raghav@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/nilfs2/segment.c

index 7ec16879756e8c01eb4be9f7a122e4a7d5b86c24..94388fe83cf86462d134446aeb44a3772bb79e6d 100644 (file)
@@ -731,10 +731,9 @@ static size_t nilfs_lookup_dirty_data_buffers(struct inode *inode,
                        continue;
                }
                head = folio_buffers(folio);
-               if (!head) {
-                       create_empty_buffers(&folio->page, i_blocksize(inode), 0);
-                       head = folio_buffers(folio);
-               }
+               if (!head)
+                       head = folio_create_empty_buffers(folio,
+                                       i_blocksize(inode), 0);
                folio_unlock(folio);
 
                bh = head;