From: Pankaj Raghav <p.raghav@samsung.com>
To: <adilger.kernel@dilger.ca>, <tytso@mit.edu>
Cc: <linux-ext4@vger.kernel.org>, <willy@infradead.org>,
<linux-kernel@vger.kernel.org>, <gost.dev@samsung.com>,
Pankaj Raghav <p.raghav@samsung.com>
Subject: [PATCH] ext4: use folio_create_empty_buffers() instead of create_empty_buffers()
Date: Fri, 12 May 2023 14:52:43 +0200 [thread overview]
Message-ID: <20230512125243.73696-1-p.raghav@samsung.com> (raw)
In-Reply-To: CGME20230512125245eucas1p1053d2f8bdf304b920b8012eaf6abf02a@eucas1p1.samsung.com
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(-)
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
parent reply other threads:[~2023-05-12 12:53 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CGME20230512125245eucas1p1053d2f8bdf304b920b8012eaf6abf02a@eucas1p1.samsung.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230512125243.73696-1-p.raghav@samsung.com \
--to=p.raghav@samsung.com \
--cc=adilger.kernel@dilger.ca \
--cc=gost.dev@samsung.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).