Skip to content

Commit c82abc2

Browse files
Andreas GruenbacherDarrick J. Wong
authored andcommitted
iomap: Rename page_prepare handler to get_folio
The ->page_prepare() handler in struct iomap_page_ops is now somewhat misnamed, so rename it to ->get_folio(). Signed-off-by: Andreas Gruenbacher <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 07c22b5 commit c82abc2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

fs/gfs2/bmap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ static int __gfs2_iomap_get(struct inode *inode, loff_t pos, loff_t length,
957957
}
958958

959959
static struct folio *
960-
gfs2_iomap_page_prepare(struct iomap_iter *iter, loff_t pos, unsigned len)
960+
gfs2_iomap_get_folio(struct iomap_iter *iter, loff_t pos, unsigned len)
961961
{
962962
struct inode *inode = iter->inode;
963963
unsigned int blockmask = i_blocksize(inode) - 1;
@@ -998,7 +998,7 @@ static void gfs2_iomap_put_folio(struct inode *inode, loff_t pos,
998998
}
999999

10001000
static const struct iomap_page_ops gfs2_iomap_page_ops = {
1001-
.page_prepare = gfs2_iomap_page_prepare,
1001+
.get_folio = gfs2_iomap_get_folio,
10021002
.put_folio = gfs2_iomap_put_folio,
10031003
};
10041004

@@ -1291,7 +1291,7 @@ int gfs2_alloc_extent(struct inode *inode, u64 lblock, u64 *dblock,
12911291
/*
12921292
* NOTE: Never call gfs2_block_zero_range with an open transaction because it
12931293
* uses iomap write to perform its actions, which begin their own transactions
1294-
* (iomap_begin, page_prepare, etc.)
1294+
* (iomap_begin, get_folio, etc.)
12951295
*/
12961296
static int gfs2_block_zero_range(struct inode *inode, loff_t from,
12971297
unsigned int length)

fs/iomap/buffered-io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,8 @@ static struct folio *__iomap_get_folio(struct iomap_iter *iter, loff_t pos,
607607
{
608608
const struct iomap_page_ops *page_ops = iter->iomap.page_ops;
609609

610-
if (page_ops && page_ops->page_prepare)
611-
return page_ops->page_prepare(iter, pos, len);
610+
if (page_ops && page_ops->get_folio)
611+
return page_ops->get_folio(iter, pos, len);
612612
else
613613
return iomap_get_folio(iter, pos);
614614
}

include/linux/iomap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,17 @@ static inline bool iomap_inline_data_valid(const struct iomap *iomap)
126126
}
127127

128128
/*
129-
* When a filesystem sets page_ops in an iomap mapping it returns, page_prepare
129+
* When a filesystem sets page_ops in an iomap mapping it returns, get_folio
130130
* and put_folio will be called for each folio written to. This only applies
131131
* to buffered writes as unbuffered writes will not typically have folios
132132
* associated with them.
133133
*
134-
* When page_prepare succeeds, put_folio will always be called to do any
134+
* When get_folio succeeds, put_folio will always be called to do any
135135
* cleanup work necessary. put_folio is responsible for unlocking and putting
136136
* @folio.
137137
*/
138138
struct iomap_page_ops {
139-
struct folio *(*page_prepare)(struct iomap_iter *iter, loff_t pos,
139+
struct folio *(*get_folio)(struct iomap_iter *iter, loff_t pos,
140140
unsigned len);
141141
void (*put_folio)(struct inode *inode, loff_t pos, unsigned copied,
142142
struct folio *folio);

0 commit comments

Comments
 (0)