[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230512125243.73696-1-p.raghav@samsung.com>
Date: Fri, 12 May 2023 14:52:43 +0200
From: Pankaj Raghav <p.raghav@...sung.com>
To: <adilger.kernel@...ger.ca>, <tytso@....edu>
CC: <linux-ext4@...r.kernel.org>, <willy@...radead.org>,
<linux-kernel@...r.kernel.org>, <gost.dev@...sung.com>,
Pankaj Raghav <p.raghav@...sung.com>
Subject: [PATCH] ext4: use folio_create_empty_buffers() instead of
create_empty_buffers()
Use folio_create_empty_buffers() as the functions that call
create_empty_buffers() work directly on folios.
Signed-off-by: Pankaj Raghav <p.raghav@...sung.com>
---
fs/ext4/inode.c | 6 +++---
fs/ext4/move_extent.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index ce5f21b6c2b3..a43bbf019316 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -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);
}
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index b5af2fc03b2f..18b38cefa27e 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -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;
--
2.39.2
Powered by blists - more mailing lists