]> git.ipfire.org Git - people/ms/linux.git/commit
fuse: write inode in fuse_vma_close() instead of fuse_release()
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 22 Oct 2021 15:03:01 +0000 (17:03 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 22 Oct 2021 15:03:01 +0000 (17:03 +0200)
commit36ea23374d1f7b6a9d96a2b61d38830fdf23e45d
tree6f4c14172f81b51aee4d208aa252c1a66a4b2adc
parent5c791fe1e2a4f401f819065ea4fc0450849f1818
fuse: write inode in fuse_vma_close() instead of fuse_release()

Fuse ->release() is otherwise asynchronous for the reason that it can
happen in contexts unrelated to close/munmap.

Inode is already written back from fuse_flush().  Add it to
fuse_vma_close() as well to make sure inode dirtying from mmaps also get
written out before the file is released.

Also add error handling.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c