@@ -922,6 +922,11 @@ static int fuse_try_move_page(struct fus
return err;
}
+ page_cache_get(newpage);
+
+ if (!(buf->flags & PIPE_BUF_FLAG_LRU))
+ lru_cache_add_file(newpage);
+
/*
* Release while we have extra ref on stolen page. Otherwise
* anon_pipe_buf_release() might think the page can be reused.
@@ -929,11 +934,6 @@ static int fuse_try_move_page(struct fus
buf->ops->release(cs->pipe, buf);
buf->ops = NULL;
- page_cache_get(newpage);
-
- if (!(buf->flags & PIPE_BUF_FLAG_LRU))
- lru_cache_add_file(newpage);
-
err = 0;
spin_lock(&cs->req->waitq.lock);
if (test_bit(FR_ABORTED, &cs->req->flags))