ext4: use folio_create_empty_buffers() instead of create_empty_buffers()
Commit Message
Use folio_create_empty_buffers() as the functions that call
create_empty_buffers() work directly on folios.
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
fs/ext4/inode.c | 6 +++---
fs/ext4/move_extent.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
@@ -1037,7 +1037,7 @@ static int ext4_block_write_begin(struct folio *folio, loff_t pos, unsigned len,
head = folio_buffers(folio);
if (!head) {
- create_empty_buffers(&folio->page, blocksize, 0);
+ folio_create_empty_buffers(folio, blocksize, 0);
head = folio_buffers(folio);
}
bbits = ilog2(blocksize);
@@ -1169,7 +1169,7 @@ static int ext4_write_begin(struct file *file, struct address_space *mapping,
* starting the handle.
*/
if (!folio_buffers(folio))
- create_empty_buffers(&folio->page, inode->i_sb->s_blocksize, 0);
+ folio_create_empty_buffers(folio, inode->i_sb->s_blocksize, 0);
folio_unlock(folio);
@@ -3632,7 +3632,7 @@ static int __ext4_block_zero_page_range(handle_t *handle,
bh = folio_buffers(folio);
if (!bh) {
- create_empty_buffers(&folio->page, blocksize, 0);
+ folio_create_empty_buffers(folio, blocksize, 0);
bh = folio_buffers(folio);
}
@@ -184,7 +184,7 @@ mext_page_mkuptodate(struct folio *folio, unsigned from, unsigned to)
blocksize = i_blocksize(inode);
head = folio_buffers(folio);
if (!head) {
- create_empty_buffers(&folio->page, blocksize, 0);
+ folio_create_empty_buffers(folio, blocksize, 0);
head = folio_buffers(folio);
}
@@ -385,7 +385,7 @@ move_extent_per_page(struct file *o_filp, struct inode *donor_inode,
/* Perform all necessary steps similar write_begin()/write_end()
* but keeping in mind that i_size will not change */
if (!folio_buffers(folio[0]))
- create_empty_buffers(&folio[0]->page, 1 << orig_inode->i_blkbits, 0);
+ folio_create_empty_buffers(folio[0], 1 << orig_inode->i_blkbits, 0);
bh = folio_buffers(folio[0]);
for (i = 0; i < data_offset_in_page; i++)
bh = bh->b_this_page;