From: Miklos Szeredi Date: Thu, 21 Dec 2006 14:18:23 +0000 (+0100) Subject: [PATCH] fuse: remove clear_page_dirty() call X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9280f6822c2d7112b47107251fce307aefb31f35;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [PATCH] fuse: remove clear_page_dirty() call The use by FUSE was just a remnant of an optimization from the time when writable mappings were supported. Now FUSE never actually allows the creation of dirty pages, so this invocation of clear_page_dirty() is effectively a no-op. Signed-off-by: Miklos Szeredi Signed-off-by: Linus Torvalds --- diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 1387749201b3..f63efe1337ec 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -483,10 +483,8 @@ static int fuse_commit_write(struct file *file, struct page *page, i_size_write(inode, pos); spin_unlock(&fc->lock); - if (offset == 0 && to == PAGE_CACHE_SIZE) { - clear_page_dirty(page); + if (offset == 0 && to == PAGE_CACHE_SIZE) SetPageUptodate(page); - } } fuse_invalidate_attr(inode); return err;