Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6affbd8a authored by bait_dispatcher_monitor_system's avatar bait_dispatcher_monitor_system Committed by Gerrit - the friendly Code Review server
Browse files

Merge "fuse: Flush files on wb close"

parents adc25be9 852d9420
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -291,6 +291,12 @@ static int fuse_open(struct inode *inode, struct file *file)

static int fuse_release(struct inode *inode, struct file *file)
{
	struct fuse_conn *fc = get_fuse_conn(inode);

	/* see fuse_vma_close() for !writeback_cache case */
	if (fc->writeback_cache)
		filemap_write_and_wait(file->f_mapping);

	if (test_bit(FUSE_I_MTIME_DIRTY, &get_fuse_inode(inode)->state))
		fuse_flush_mtime(file, true);