Skip to content

Commit e297416

Browse files
Matthew Wilcox (Oracle)jankara
authored andcommitted
udf: Use a folio in udf_write_end()
Convert the page to a folio and use the folio APIs. Replaces three calls to compound_head() with one. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Jan Kara <[email protected]> Message-Id: <[email protected]>
1 parent f5985ef commit e297416

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

fs/udf/inode.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,17 +276,19 @@ static int udf_write_end(struct file *file, struct address_space *mapping,
276276
struct page *page, void *fsdata)
277277
{
278278
struct inode *inode = file_inode(file);
279+
struct folio *folio;
279280
loff_t last_pos;
280281

281282
if (UDF_I(inode)->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB)
282283
return generic_write_end(file, mapping, pos, len, copied, page,
283284
fsdata);
285+
folio = page_folio(page);
284286
last_pos = pos + copied;
285287
if (last_pos > inode->i_size)
286288
i_size_write(inode, last_pos);
287-
set_page_dirty(page);
288-
unlock_page(page);
289-
put_page(page);
289+
folio_mark_dirty(folio);
290+
folio_unlock(folio);
291+
folio_put(folio);
290292

291293
return copied;
292294
}

0 commit comments

Comments
 (0)