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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the convenience wrappers instead of invoking ->write_begin and
->write_end directly.

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

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;
-- 
2.34.1




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux