Skip to content
  • Pavel Emelyanov's avatar
    fuse: Flush files on wb close · e7cc133c
    Pavel Emelyanov authored
    
    
    Any write request requires a file handle to report to the userspace. Thus
    when we close a file (and free the fuse_file with this info) we have to
    flush all the outstanding dirty pages.
    
    filemap_write_and_wait() is enough because every page under fuse writeback
    is accounted in ff->count. This delays actual close until all fuse wb is
    completed.
    
    In case of "write cache" turned off, the flush is ensured by fuse_vma_close().
    
    Signed-off-by: default avatarMaxim Patlasov <MPatlasov@parallels.com>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
    e7cc133c