All callers now have a folio, so convert sysv_prepare_chunk() to take one.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
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);
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;
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;
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;
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)
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);