Skip to content

Commit 478e084

Browse files
Johannes WeinerMiklos Szeredi
authored andcommitted
fuse: mark pages accessed when written to
As fuse does not use the page cache library functions when userspace writes to a file, it did not benefit from 'c8236db mm: mark page accessed before we write_end()' that made sure pages are properly marked accessed when written to. Signed-off-by: Johannes Weiner <jweiner@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
1 parent b40cdd5 commit 478e084

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎fs/fuse/file.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/sched.h>
1515
#include <linux/module.h>
1616
#include <linux/compat.h>
17+
#include <linux/swap.h>
1718

1819
static const struct file_operations fuse_direct_io_file_operations;
1920

@@ -834,6 +835,8 @@ static ssize_t fuse_fill_write_pages(struct fuse_req *req,
834835
pagefault_enable();
835836
flush_dcache_page(page);
836837

838+
mark_page_accessed(page);
839+
837840
if (!tmp) {
838841
unlock_page(page);
839842
page_cache_release(page);

0 commit comments

Comments
 (0)