]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
fuse: decrement NR_WRITEBACK_TEMP on the right page
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 16 Jan 2019 09:27:59 +0000 (10:27 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 23 Apr 2019 15:51:48 +0000 (17:51 +0200)
BugLink: https://bugs.launchpad.net/bugs/1824553
NR_WRITEBACK_TEMP is accounted on the temporary page in the request, not
the page cache page.

Fixes: 8b284dc47291 ("fuse: writepages: handle same page rewrites")
Cc: <stable@vger.kernel.org> # v3.13
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
(cherry picked from commit a2ebba824106dabe79937a9f29a875f837e1b6d4)
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/fuse/file.c

index cfcc313c28e30f63e2d04c3aed6605751b665d38..b81d565f6279b6973cc2b209ffe218c9b76bd7db 100644 (file)
@@ -1776,7 +1776,7 @@ static bool fuse_writepage_in_flight(struct fuse_req *new_req,
                spin_unlock(&fc->lock);
 
                dec_wb_stat(&bdi->wb, WB_WRITEBACK);
-               dec_node_page_state(page, NR_WRITEBACK_TEMP);
+               dec_node_page_state(new_req->pages[0], NR_WRITEBACK_TEMP);
                wb_writeout_inc(&bdi->wb);
                fuse_writepage_free(fc, new_req);
                fuse_request_free(new_req);