Thread (46 messages) 46 messages, 5 authors, 2023-09-20
STALE1029d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 15/26] nilfs2: Convert nilfs_lookup_dirty_data_buffers to use folio_create_empty_buffers

From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Date: 2023-09-19 04:51:57
Also in: gfs2, linux-fsdevel, ntfs3, ocfs2-devel
Subsystem: filesystems (vfs and infrastructure), nilfs2 filesystem, the rest · Maintainers: Alexander Viro, Christian Brauner, Ryusuke Konishi, Viacheslav Dubeyko, Linus Torvalds

This function was already using a folio, so this update to the new API
removes a single folio->page->folio conversion.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/nilfs2/segment.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 7ec16879756e..94388fe83cf8 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -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;
-- 
2.40.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help