Skip to content

Commit

Permalink
fuse: mark pages accessed when written to
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Weiner authored and Miklos Szeredi committed Aug 8, 2011
1 parent b40cdd5 commit 478e084
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/compat.h>
#include <linux/swap.h>

static const struct file_operations fuse_direct_io_file_operations;

Expand Down Expand Up @@ -834,6 +835,8 @@ static ssize_t fuse_fill_write_pages(struct fuse_req *req,
pagefault_enable();
flush_dcache_page(page);

mark_page_accessed(page);

if (!tmp) {
unlock_page(page);
page_cache_release(page);
Expand Down

0 comments on commit 478e084

Please sign in to comment.