Thread (16 messages) 16 messages, 2 authors, 2021-07-07
STALE1813d
Revisions (2)
  1. v2 current
  2. v3 [diff vs current]

[PATCH v2 7/8] 9p: migrate from sync_inode to filemap_fdatawrite_wbc

From: Josef Bacik <josef@toxicpanda.com>
Date: 2021-06-29 13:59:44
Also in: linux-fsdevel
Subsystem: 9p file system, filesystems (vfs and infrastructure), the rest · Maintainers: Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet, Alexander Viro, Christian Brauner, Linus Torvalds

We're going to remove sync_inode, so migrate to filemap_fdatawrite_wbc
instead.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/9p/vfs_file.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 59c32c9b799f..6b64e8391f30 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -625,12 +625,7 @@ static void v9fs_mmap_vm_close(struct vm_area_struct *vma)
 	p9_debug(P9_DEBUG_VFS, "9p VMA close, %p, flushing", vma);
 
 	inode = file_inode(vma->vm_file);
-
-	if (!mapping_can_writeback(inode->i_mapping))
-		wbc.nr_to_write = 0;
-
-	might_sleep();
-	sync_inode(inode, &wbc);
+	filemap_fdatawrite_wbc(inode->i_mapping, &wbc);
 }
 
 
-- 
2.26.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help