diff mbox series

[20/22] f2fs: Use pagecache_write_begin() & pagecache_write_end()

Message ID 20220222194820.737755-21-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Remove aop flags | expand

Commit Message

Matthew Wilcox Feb. 22, 2022, 7:48 p.m. UTC
Use the convenience wrappers instead of invoking ->write_begin and
->write_end directly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/f2fs/super.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index baefd398ec1a..fe4adf761f81 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2487,7 +2487,6 @@  static ssize_t f2fs_quota_write(struct super_block *sb, int type,
 {
 	struct inode *inode = sb_dqopt(sb)->files[type];
 	struct address_space *mapping = inode->i_mapping;
-	const struct address_space_operations *a_ops = mapping->a_ops;
 	int offset = off & (sb->s_blocksize - 1);
 	size_t towrite = len;
 	struct page *page;
@@ -2500,7 +2499,7 @@  static ssize_t f2fs_quota_write(struct super_block *sb, int type,
 		tocopy = min_t(unsigned long, sb->s_blocksize - offset,
 								towrite);
 retry:
-		err = a_ops->write_begin(NULL, mapping, off, tocopy, 0,
+		err = pagecache_write_begin(NULL, mapping, off, tocopy,
 							&page, &fsdata);
 		if (unlikely(err)) {
 			if (err == -ENOMEM) {
@@ -2517,7 +2516,7 @@  static ssize_t f2fs_quota_write(struct super_block *sb, int type,
 		kunmap_atomic(kaddr);
 		flush_dcache_page(page);
 
-		a_ops->write_end(NULL, mapping, off, tocopy, tocopy,
+		pagecache_write_end(NULL, mapping, off, tocopy, tocopy,
 						page, fsdata);
 		offset = 0;
 		towrite -= tocopy;