Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-02-12 22:18:26 +0100
committerJiri Slaby <jslaby@suse.cz>2019-02-12 22:21:18 +0100
commit0adae2c09192fd1442cdf33421e1000221da591e (patch)
tree04c2b3f9c588cbec0c011d63d5b7b0d1c5586b58
parent22aa8709a7fa4bf7a310cf44e9452169d251fd53 (diff)
fuse: decrement NR_WRITEBACK_TEMP on the right page
-rw-r--r--patches.kernel.org/4.20.8-312-fuse-decrement-NR_WRITEBACK_TEMP-on-the-right-.patch37
-rw-r--r--series.conf1
2 files changed, 38 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.8-312-fuse-decrement-NR_WRITEBACK_TEMP-on-the-right-.patch b/patches.kernel.org/4.20.8-312-fuse-decrement-NR_WRITEBACK_TEMP-on-the-right-.patch
new file mode 100644
index 0000000000..f1fd6d6d06
--- /dev/null
+++ b/patches.kernel.org/4.20.8-312-fuse-decrement-NR_WRITEBACK_TEMP-on-the-right-.patch
@@ -0,0 +1,37 @@
+From: Miklos Szeredi <mszeredi@redhat.com>
+Date: Wed, 16 Jan 2019 10:27:59 +0100
+Subject: [PATCH] fuse: decrement NR_WRITEBACK_TEMP on the right page
+References: bnc#1012628
+Patch-mainline: 4.20.8
+Git-commit: a2ebba824106dabe79937a9f29a875f837e1b6d4
+
+commit a2ebba824106dabe79937a9f29a875f837e1b6d4 upstream.
+
+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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ fs/fuse/file.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/fuse/file.c b/fs/fuse/file.c
+index ffaffe18352a..a59c16bd90ac 100644
+--- a/fs/fuse/file.c
++++ b/fs/fuse/file.c
+@@ -1782,7 +1782,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);
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index a44edd7e7c..df5365762e 100644
--- a/series.conf
+++ b/series.conf
@@ -1048,6 +1048,7 @@
patches.kernel.org/4.20.8-309-ALSA-hda-realtek-Use-a-common-helper-for-hp-pi.patch
patches.kernel.org/4.20.8-310-ALSA-hda-realtek-Headset-microphone-support-fo.patch
patches.kernel.org/4.20.8-311-fuse-call-pipe_buf_release-under-pipe-lock.patch
+ patches.kernel.org/4.20.8-312-fuse-decrement-NR_WRITEBACK_TEMP-on-the-right-.patch
########################################################
# Build fixes that apply to the vanilla kernel too.