9p: migrate from sync_inode to filemap_fdatawrite_wbc
authorJosef Bacik <josef@toxicpanda.com>
Wed, 14 Jul 2021 18:47:24 +0000 (14:47 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:07 +0000 (13:19 +0200)
We're going to remove sync_inode, so migrate to filemap_fdatawrite_wbc
instead.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/9p/vfs_file.c

index 59c32c9..6b64e83 100644 (file)
@@ -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);
 }