From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: linux-fsdevel@vger.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Al Viro <viro@zeniv.linux.org.uk>, Christoph Hellwig <hch@lst.de>
Subject: [PATCH 6/7] sysv: Convert sysv_prepare_chunk() to take a folio
Date: Tue, 9 Jul 2024 16:03:11 +0100 [thread overview]
Message-ID: <20240709150314.1906109-7-willy@infradead.org> (raw)
In-Reply-To: <20240709150314.1906109-1-willy@infradead.org>
All callers now have a folio, so convert ufs_prepare_chunk() to take one.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
fs/sysv/dir.c | 8 ++++----
fs/sysv/itree.c | 4 ++--
fs/sysv/sysv.h | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/sysv/dir.c b/fs/sysv/dir.c
index 5f91a82a2966..43615b803fee 100644
--- a/fs/sysv/dir.c
+++ b/fs/sysv/dir.c
@@ -213,7 +213,7 @@ int sysv_add_link(struct dentry *dentry, struct inode *inode)
got_it:
pos = folio_pos(folio) + offset_in_folio(folio, de);
folio_lock(folio);
- err = sysv_prepare_chunk(&folio->page, pos, SYSV_DIRSIZE);
+ err = sysv_prepare_chunk(folio, pos, SYSV_DIRSIZE);
if (err)
goto out_unlock;
memcpy (de->name, name, namelen);
@@ -238,7 +238,7 @@ int sysv_delete_entry(struct sysv_dir_entry *de, struct folio *folio)
int err;
folio_lock(folio);
- err = sysv_prepare_chunk(&folio->page, pos, SYSV_DIRSIZE);
+ err = sysv_prepare_chunk(folio, pos, SYSV_DIRSIZE);
if (err) {
folio_unlock(folio);
return err;
@@ -259,7 +259,7 @@ int sysv_make_empty(struct inode *inode, struct inode *dir)
if (IS_ERR(folio))
return PTR_ERR(folio);
- err = sysv_prepare_chunk(&folio->page, 0, 2 * SYSV_DIRSIZE);
+ err = sysv_prepare_chunk(folio, 0, 2 * SYSV_DIRSIZE);
if (err) {
folio_unlock(folio);
goto fail;
@@ -335,7 +335,7 @@ int sysv_set_link(struct sysv_dir_entry *de, struct folio *folio,
int err;
folio_lock(folio);
- err = sysv_prepare_chunk(&folio->page, pos, SYSV_DIRSIZE);
+ err = sysv_prepare_chunk(folio, pos, SYSV_DIRSIZE);
if (err) {
folio_unlock(folio);
return err;
diff --git a/fs/sysv/itree.c b/fs/sysv/itree.c
index 19bcb51a2203..c8511e286673 100644
--- a/fs/sysv/itree.c
+++ b/fs/sysv/itree.c
@@ -466,9 +466,9 @@ static int sysv_read_folio(struct file *file, struct folio *folio)
return block_read_full_folio(folio, get_block);
}
-int sysv_prepare_chunk(struct page *page, loff_t pos, unsigned len)
+int sysv_prepare_chunk(struct folio *folio, loff_t pos, unsigned len)
{
- return __block_write_begin(page, pos, len, get_block);
+ return __block_write_begin(&folio->page, pos, len, get_block);
}
static void sysv_write_failed(struct address_space *mapping, loff_t to)
diff --git a/fs/sysv/sysv.h b/fs/sysv/sysv.h
index fec9f6b883d5..0a48b2e7edb1 100644
--- a/fs/sysv/sysv.h
+++ b/fs/sysv/sysv.h
@@ -133,8 +133,8 @@ extern void sysv_free_block(struct super_block *, sysv_zone_t);
extern unsigned long sysv_count_free_blocks(struct super_block *);
/* itree.c */
-extern void sysv_truncate(struct inode *);
-extern int sysv_prepare_chunk(struct page *page, loff_t pos, unsigned len);
+void sysv_truncate(struct inode *);
+int sysv_prepare_chunk(struct folio *folio, loff_t pos, unsigned len);
/* inode.c */
extern struct inode *sysv_iget(struct super_block *, unsigned int);
--
2.43.0
next prev parent reply other threads:[~2024-07-09 15:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 15:03 [PATCH 0/7] Convert sysv directory handling to folios Matthew Wilcox (Oracle)
2024-07-09 15:03 ` [PATCH 1/7] sysv: Convert dir_get_page() to dir_get_folio() Matthew Wilcox (Oracle)
2024-07-09 15:03 ` [PATCH 2/7] sysv: Convert sysv_find_entry() to take a folio Matthew Wilcox (Oracle)
2024-07-09 15:03 ` [PATCH 3/7] sysv: Convert sysv_set_link() and sysv_dotdot() " Matthew Wilcox (Oracle)
2024-07-09 15:03 ` [PATCH 4/7] sysv: Convert sysv_delete_entry() to work on " Matthew Wilcox (Oracle)
2024-07-09 15:03 ` [PATCH 5/7] sysv: Convert sysv_make_empty() to use " Matthew Wilcox (Oracle)
2024-07-09 15:03 ` Matthew Wilcox (Oracle) [this message]
2024-07-09 15:03 ` [PATCH 7/7] sysv: Convert dir_commit_chunk() to take " Matthew Wilcox (Oracle)
2024-07-16 8:17 ` [PATCH 0/7] Convert sysv directory handling to folios Christian Brauner
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=20240709150314.1906109-7-willy@infradead.org \
--to=willy@infradead.org \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).