fuse: fix page invalidation
commitb10099792b6276c31cee4c021e0a5d3f9a9e33ed
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 17 Oct 2007 06:31:01 +0000 (16 23:31 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:43:03 +0000 (17 08:43 -0700)
treec90873999de5936d27b0a10e61c4de3b742bf401
parente00d2c2d4aead747d0fbee99001b00612d1082b0
fuse: fix page invalidation

Other than truncate, there are two cases, when fuse tries to get rid
of cached pages:

 a) in open, if KEEP_CACHE flag is not set
 b) in getattr, if file size changed spontaneously

Until now invalidate_mapping_pages() were used, which didn't get rid
of mapped pages.  This is wrong, and becomes more wrong as dirty pages
are introduced.  So instead properly invalidate all pages with
invalidate_inode_pages2().

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/fuse/file.c
fs/fuse/inode.c