From patchwork Tue Feb 16 21:34:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tahsin Erdogan X-Patchwork-Id: 8332481 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 1D8EAC02AA for ; Tue, 16 Feb 2016 21:35:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4998B202BE for ; Tue, 16 Feb 2016 21:35:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 482DC20204 for ; Tue, 16 Feb 2016 21:35:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755589AbcBPVfe (ORCPT ); Tue, 16 Feb 2016 16:35:34 -0500 Received: from mail-pf0-f176.google.com ([209.85.192.176]:34452 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbcBPVfd (ORCPT ); Tue, 16 Feb 2016 16:35:33 -0500 Received: by mail-pf0-f176.google.com with SMTP id x65so111747239pfb.1 for ; Tue, 16 Feb 2016 13:35:33 -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=dborTRi9v7OfU+fWyJb9/+sMjfGYvEZv5Yb31K7gdaY=; b=bF6lHU7ICVecjUVHD+DGpnv0vygEn3RtWnbp5I1mihPeADl34szsP5/p1nJrIEnbR9 xbdZzhHTjP6zWrqOolG6KRpjVOGDyvFYr2tDQA2mbOEr2zwmf3REf8uW7r9JKs5nzM7T 8bRCn0ScOtN9TvwAmu1MVXYMzIYAjB9YMfDDbvxljIPYcY4DRuOynJ20x7RxhfyxO0uP +ajh691XzieFHOkXU0u/ZUN87nO/j8BU7KN0yal/e+yWv9vWZ5PAs7p/c3vshjEjlpJ8 wTbb4x+rmLXS1BiWa3u49yQE4ihHbRrOz8PKabF+77ScJYStzh4+oNK0PoX4vM0EOR3x OIuw== 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=dborTRi9v7OfU+fWyJb9/+sMjfGYvEZv5Yb31K7gdaY=; b=QmcV1EnCYelpDJloqq824nZL0x0HxivepOqK1PHtaLjiA1Wehxw1aenhQm8h8DC5FV +zzuPXgj+1HJl2HbwJ5WuCZHkWH6CTSwbh+PYmWIRgXoioNUnv9nzDviNxOLHMvmmzuY ZwkVnP3gS1ZVWStUJ3r4OOYpavpw2tS0RRyGEhBsFEW1FMZJfltjNwQeFIW7ZUpq0Oqd z0owph9qr/jhxccaUGHBCNRHn25/cHckG8x0ttJ583eKSKTmP3enKb/JfQ3M01bDtX5I g3wgL2X+qk8Myhei7tNWFTWFy/7Qioj1IpQ7DcqVdHXbZHUFCPC0Fa89a8Vk4CPuLebM OWAg== X-Gm-Message-State: AG10YORhJ+ESTVU+0GMxYlzwO+QahjZcQr3WvKiu4iU9F8HgdFjezfg0oS04gRZ6/dv6yEiv X-Received: by 10.98.32.150 with SMTP id m22mr33967678pfj.27.1455658532932; Tue, 16 Feb 2016 13:35:32 -0800 (PST) Received: from tahsin1.mtv.corp.google.com ([172.17.128.201]) by smtp.gmail.com with ESMTPSA id 70sm47860261pfs.78.2016.02.16.13.35.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Feb 2016 13:35:31 -0800 (PST) From: Tahsin Erdogan To: Tejun Heo , Alexander Viro Cc: Jens Axboe , 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 13:34:39 -0800 Message-Id: <1455658479-12433-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 Acked-by: Tejun Heo --- 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);