Skip to content

Commit 40405dd

Browse files
Andreas GruenbacherDarrick J. Wong
authored andcommitted
iomap: Rename page_done handler to put_folio
The ->page_done() handler in struct iomap_page_ops is now somewhat misnamed in that it mainly deals with unlocking and putting a folio, so rename it to ->put_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 80baab8 commit 40405dd

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

fs/gfs2/bmap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ static int gfs2_iomap_page_prepare(struct inode *inode, loff_t pos,
967967
return gfs2_trans_begin(sdp, RES_DINODE + blocks, 0);
968968
}
969969

970-
static void gfs2_iomap_page_done(struct inode *inode, loff_t pos,
970+
static void gfs2_iomap_put_folio(struct inode *inode, loff_t pos,
971971
unsigned copied, struct folio *folio)
972972
{
973973
struct gfs2_trans *tr = current->journal_info;
@@ -994,7 +994,7 @@ static void gfs2_iomap_page_done(struct inode *inode, loff_t pos,
994994

995995
static const struct iomap_page_ops gfs2_iomap_page_ops = {
996996
.page_prepare = gfs2_iomap_page_prepare,
997-
.page_done = gfs2_iomap_page_done,
997+
.put_folio = gfs2_iomap_put_folio,
998998
};
999999

10001000
static int gfs2_iomap_begin_write(struct inode *inode, loff_t pos,

fs/iomap/buffered-io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,8 @@ static void __iomap_put_folio(struct iomap_iter *iter, loff_t pos, size_t ret,
580580
{
581581
const struct iomap_page_ops *page_ops = iter->iomap.page_ops;
582582

583-
if (page_ops && page_ops->page_done) {
584-
page_ops->page_done(iter->inode, pos, ret, folio);
583+
if (page_ops && page_ops->put_folio) {
584+
page_ops->put_folio(iter->inode, pos, ret, folio);
585585
} else if (folio) {
586586
folio_unlock(folio);
587587
folio_put(folio);

include/linux/iomap.h

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

127127
/*
128128
* When a filesystem sets page_ops in an iomap mapping it returns, page_prepare
129-
* and page_done will be called for each page written to. This only applies to
130-
* buffered writes as unbuffered writes will not typically have pages
129+
* and put_folio will be called for each folio written to. This only applies
130+
* to buffered writes as unbuffered writes will not typically have folios
131131
* associated with them.
132132
*
133-
* When page_prepare succeeds, page_done will always be called to do any
134-
* cleanup work necessary. In that page_done call, @folio will be NULL if the
135-
* associated folio could not be obtained. When folio is not NULL, page_done
133+
* When page_prepare succeeds, put_folio will always be called to do any
134+
* cleanup work necessary. In that put_folio call, @folio will be NULL if the
135+
* associated folio could not be obtained. When folio is not NULL, put_folio
136136
* is responsible for unlocking and putting the folio.
137137
*/
138138
struct iomap_page_ops {
139139
int (*page_prepare)(struct inode *inode, loff_t pos, unsigned len);
140-
void (*page_done)(struct inode *inode, loff_t pos, unsigned copied,
140+
void (*put_folio)(struct inode *inode, loff_t pos, unsigned copied,
141141
struct folio *folio);
142142

143143
/*

0 commit comments

Comments
 (0)