Commit c1b0c3cf authored by Andreas Gruenbacher's avatar Andreas Gruenbacher

gfs2: Convert gfs2_page_add_databufs to folios

Convert gfs2_page_add_databufs() to folios and rename it to
gfs2_trans_add_databufs().

Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent cbb60951
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
#include "aops.h" #include "aops.h"
void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page, void gfs2_trans_add_databufs(struct gfs2_inode *ip, struct folio *folio,
unsigned int from, unsigned int len) unsigned int from, unsigned int len)
{ {
struct buffer_head *head = page_buffers(page); struct buffer_head *head = folio_buffers(folio);
unsigned int bsize = head->b_size; unsigned int bsize = head->b_size;
struct buffer_head *bh; struct buffer_head *bh;
unsigned int to = from + len; unsigned int to = from + len;
...@@ -134,7 +134,7 @@ static int __gfs2_jdata_writepage(struct page *page, struct writeback_control *w ...@@ -134,7 +134,7 @@ static int __gfs2_jdata_writepage(struct page *page, struct writeback_control *w
create_empty_buffers(page, inode->i_sb->s_blocksize, create_empty_buffers(page, inode->i_sb->s_blocksize,
BIT(BH_Dirty)|BIT(BH_Uptodate)); BIT(BH_Dirty)|BIT(BH_Uptodate));
} }
gfs2_page_add_databufs(ip, page, 0, PAGE_SIZE); gfs2_trans_add_databufs(ip, page_folio(page), 0, PAGE_SIZE);
} }
return gfs2_write_jdata_page(page, wbc); return gfs2_write_jdata_page(page, wbc);
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "incore.h" #include "incore.h"
extern void adjust_fs_space(struct inode *inode); extern void adjust_fs_space(struct inode *inode);
extern void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page, extern void gfs2_trans_add_databufs(struct gfs2_inode *ip, struct folio *folio,
unsigned int from, unsigned int len); unsigned int from, unsigned int len);
#endif /* __AOPS_DOT_H__ */ #endif /* __AOPS_DOT_H__ */
...@@ -985,8 +985,8 @@ static void gfs2_iomap_put_folio(struct inode *inode, loff_t pos, ...@@ -985,8 +985,8 @@ static void gfs2_iomap_put_folio(struct inode *inode, loff_t pos,
struct gfs2_sbd *sdp = GFS2_SB(inode); struct gfs2_sbd *sdp = GFS2_SB(inode);
if (!gfs2_is_stuffed(ip)) if (!gfs2_is_stuffed(ip))
gfs2_page_add_databufs(ip, &folio->page, offset_in_page(pos), gfs2_trans_add_databufs(ip, folio, offset_in_folio(folio, pos),
copied); copied);
folio_unlock(folio); folio_unlock(folio);
folio_put(folio); folio_put(folio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment