Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2691502imj; Mon, 11 Feb 2019 07:05:39 -0800 (PST) X-Google-Smtp-Source: AHgI3IY9FmdNgdfH+pfiq3kQOPIRQ3VPuXRFx6l0K3uzHVH+ukWxHjz2xRvTqmhNi/wal9cu5DQ7 X-Received: by 2002:a62:4851:: with SMTP id v78mr37234788pfa.97.1549897539520; Mon, 11 Feb 2019 07:05:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549897539; cv=none; d=google.com; s=arc-20160816; b=ABjC6hd2UYwAWKT62lFY0sKzoRk7mG4D3Y75MfwjdQu+4prYZObUFwgxMBSYU34bbL r1Ogc2hDlUNsdvK/B1SNsJYQ+TmG8YF6BoXF/b6xITs1tlASpwW5vzxy9FB2+RhNgfRl fS5ETChNWW6xNpRw0yTlYdwYAQXl7uMv2/UcBLCJDGqD9I+6t3vzNcop1eAxsnvDgGm/ OVjfK0GwxmYAZYNnzsdZSLU0f/zMve2ZYvRT/qicHJ4aG9Ba1F4EyVVIPU6ytNFmRnXe YvK+C9OKXUDeNfHse49N3SEm9uCSCYu5hA8T43uAmShYliZ4JTEZYD3ggrtLHSlqQD2K QQZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JbFeMc0VJkiDEC/LAkFBJjPskqJEeIrON558sYIfV+M=; b=w4W2LcQAKxQrMzAy0y1sl+hareVu63zNo2Ol4FEsUEErbAxXp6FZSMFnJ4FTQkDW2A VFIEEJfzYg9L9D7ml2nZKRPXNqhewKkRNPfHFsX9SE2uzVFWW2tmoZTjTgWh285ePJD/ D/w9gccxNMaIH1HGSmZ0VbNa+SF+IhEzz0DsLtt9/LBThOGHwbfkhWHXidDmlSkBH8lq oRZKS8DlV1Q9wgj3TEOAG4CO2cCak+xVmjAm8bjIkVBQalK0doUiRtEhTNjhIZ+tVvUx e+cTnswN13m5lemH1cN5zJWl5P/onkacvFDQb0x9kmh3FWRguSpkgOJwF/DxzLMTWvZK KUGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dCC7yLPM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7si2278528pgd.460.2019.02.11.07.05.19; Mon, 11 Feb 2019 07:05:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dCC7yLPM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390493AbfBKPCw (ORCPT + 99 others); Mon, 11 Feb 2019 10:02:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:50994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390480AbfBKPCq (ORCPT ); Mon, 11 Feb 2019 10:02:46 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8990C222A7; Mon, 11 Feb 2019 15:02:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897366; bh=xBhMphdUPayMhzcwE8atPzeY7WUOtsvXP3KH6HnfIhM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dCC7yLPMcWKjjCV8Jo4KNxU0uWUowj7p8fAdBnEmJBYKgXXdtiz8rfxSaEbWoA3yy KVWfqGt8fyYGSuNhWp1eFzzhpBp1IKQxQnM830KBMdHIdI1vYVqDvHlEKRLk1+mWxQ YbM6OZnCAPPqqr0V8f2MNcbfI18liNggHbeUdZ/o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miklos Szeredi Subject: [PATCH 4.14 178/205] fuse: decrement NR_WRITEBACK_TEMP on the right page Date: Mon, 11 Feb 2019 15:19:36 +0100 Message-Id: <20190211141840.020762776@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Miklos Szeredi 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: # v3.13 Signed-off-by: Miklos Szeredi Signed-off-by: Greg Kroah-Hartman --- fs/fuse/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1777,7 +1777,7 @@ static bool fuse_writepage_in_flight(str 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);