From patchwork Tue Feb 16 19:10:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tahsin Erdogan X-Patchwork-Id: 8331101 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2CF14C02AA for ; Tue, 16 Feb 2016 19:12:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D3082028D for ; Tue, 16 Feb 2016 19:12:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6DC9120279 for ; Tue, 16 Feb 2016 19:12:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933287AbcBPTLx (ORCPT ); Tue, 16 Feb 2016 14:11:53 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:35391 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933258AbcBPTLu (ORCPT ); Tue, 16 Feb 2016 14:11:50 -0500 Received: by mail-pf0-f178.google.com with SMTP id c10so112192088pfc.2 for ; Tue, 16 Feb 2016 11:11:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=SdPgc6ky1PaBNvR90NEexYJuNie8aRZKoE5L4reInOk=; b=MEzDgQtin9gPpI44Tcl5evtkL5LqpqfWjrBtXTA7W2dR43xm6yZ7zNk36PugOEGUJD uyISE8w6MwVh7k+qMHsD1RV2SfsVzOFta+VTcEwwD+/9cr89K0uwSC18I6vcjY57s1A1 WtzjM4VhtqI2hJepOWmWOBhDR9rQjjnwJiwcUT20s8JVqa4LR/WEQsfHeY1u5hKm/QD+ XEm15nND7l0tIMu1he2HzUq4QaVlNxb4o5NQ4cYRnmW5E6da0AHPqyi0RPuO2gPORIDl kSbGTMI/jLQo1f8p4huJC98oDQJz8rDVL71PGRfgWJdw7SrEkT2WjAxsK4y8ylRH39yA QeIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SdPgc6ky1PaBNvR90NEexYJuNie8aRZKoE5L4reInOk=; b=ZU1IWmIlGGyGZWDTSfF+fnYLL3HMA9X7TrQ1DE0WwT30CJJxhV03IprookTs5kfNzE nZSzD5T1ciqAJL+SbTSHjjYMTsJsJPjj+dgkjA3jTH2Kbyc1Kg1GN+Clac3Szu0uRBtP E61q2HhsoSKThHmbFn/VTZW4KhBwSxejM6rneKKbe0wjmaIOimh//dK+YOrZK6HgpHwe RZFSfQItG1OuGsKfZqjbsGSssDo9bBlUbDVlKPbSLKKim9QpRA79RNI04tumJj/1izD/ jw973EwB+wedh0w5Qgq9ct/nkOzecoB+3P8vxdkv1lI0H4R0FwNLJWo2EY7yrkJEDHXg o9NA== X-Gm-Message-State: AG10YORuRrk1o0voB46uxl6zgDVmloJFmERy8SlfRPiMQrIeFtpzuyCY28oqFhdYQ8BC/AEH X-Received: by 10.98.8.80 with SMTP id c77mr33041100pfd.42.1455649910228; Tue, 16 Feb 2016 11:11:50 -0800 (PST) Received: from tahsin1.mtv.corp.google.com ([172.17.128.201]) by smtp.gmail.com with ESMTPSA id cq4sm47563869pad.28.2016.02.16.11.11.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Feb 2016 11:11:48 -0800 (PST) From: Tahsin Erdogan To: Tejun Heo , Alexander Viro Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Tahsin Erdogan Subject: [PATCH] writeback: initialize inode members that track writeback history Date: Tue, 16 Feb 2016 11:10:35 -0800 Message-Id: <1455649835-25117-1-git-send-email-tahsin@google.com> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP inode struct members that track cgroup writeback information should be reinitialized when inode gets allocated from kmem_cache. Otherwise, their values remain and get used by the new inode. Signed-off-by: Tahsin Erdogan --- fs/inode.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/inode.c b/fs/inode.c index 9f62db3..69b8b52 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -154,6 +154,12 @@ int inode_init_always(struct super_block *sb, struct inode *inode) inode->i_rdev = 0; inode->dirtied_when = 0; +#ifdef CONFIG_CGROUP_WRITEBACK + inode->i_wb_frn_winner = 0; + inode->i_wb_frn_avg_time = 0; + inode->i_wb_frn_history = 0; +#endif + if (security_inode_alloc(inode)) goto out; spin_lock_init(&inode->i_lock);