[PATCH 3.4 093/172] fuse: notify: don't move pages

lizf
2015-06-16T08:46:40Z

From: Miklos Szeredi <mszeredi@suse.cz>

3.4.108-rc1 review patch. If anyone has any objections, please let me know.

------------------

commit 0d2783626a53d4c922f82d51fa675cb5d13f0d36 upstream.

fuse_try_move_page() is not prepared for replacing pages that have already
been read.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Zefan Li <lizefan@huawei.com>
---
fs/fuse/dev.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index f4246cf..8b3fd48 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1634,6 +1634,9 @@ copy_finish:
static int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code,
unsigned int size, struct fuse_copy_state *cs)
{
+ /* Don't try to move pages (yet) */
+ cs->move_pages = 0;
+
switch (code) {
case FUSE_NOTIFY_POLL:
return fuse_notify_poll(fc, size, cs);
--
1.9.1