From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753744AbcFMWLw (ORCPT ); Mon, 13 Jun 2016 18:11:52 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:34345 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753556AbcFMWLt (ORCPT ); Mon, 13 Jun 2016 18:11:49 -0400 Date: Mon, 13 Jun 2016 18:11:47 -0400 From: Tejun Heo To: Tahsin Erdogan Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] writeback: inode cgroup wb switch should skip inode with zero i_count Message-ID: <20160613221147.GJ31708@htj.duckdns.org> References: <1465441168-17738-1-git-send-email-tahsin@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465441168-17738-1-git-send-email-tahsin@google.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 08, 2016 at 07:59:28PM -0700, Tahsin Erdogan wrote: > Asynchronous wb switching of inodes takes an additional ref count on an > inode to make sure inode remains valid until switchover is completed. > > However, it is possible that inode->i_count has already reached zero > while inode is in writeback queue: > > ------------[ cut here ]------------ > WARNING: CPU: 1 PID: 917 at fs/inode.c:397 ihold+0x2b/0x30 > CPU: 1 PID: 917 Comm: kworker/u4:5 Not tainted 4.7.0-rc2+ #49 > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs > 01/01/2011 > Workqueue: writeback wb_workfn (flush-8:16) > 0000000000000000 ffff88007ca0fb58 ffffffff805990af 0000000000000000 > 0000000000000000 ffff88007ca0fb98 ffffffff80268702 0000018d000004e2 > ffff88007cef40e8 ffff88007c9b89a8 ffff880079e3a740 0000000000000003 > Call Trace: > [] dump_stack+0x4d/0x6e > [] __warn+0xc2/0xe0 > [] warn_slowpath_null+0x18/0x20 > [] ihold+0x2b/0x30 > [] inode_switch_wbs+0x11c/0x180 > [] wbc_detach_inode+0x170/0x1a0 > [] writeback_sb_inodes+0x21c/0x530 > [] wb_writeback+0xee/0x1e0 > [] wb_workfn+0xd7/0x280 > [] ? try_to_wake_up+0x1b1/0x2b0 > [] process_one_work+0x129/0x300 > [] worker_thread+0x126/0x480 > [] ? __schedule+0x1c7/0x561 > [] ? process_one_work+0x300/0x300 > [] kthread+0xc4/0xe0 > [] ? kfree+0xc8/0x100 > [] ret_from_fork+0x1f/0x40 > [] ? __kthread_parkme+0x70/0x70 > ---[ end trace aaefd2fd9f306bc4 ]--- > > Signed-off-by: Tahsin Erdogan Acked-by: Tejun Heo Can you please repost the patch to Jens Axboe with acked-by added? Please also cc Jan Kara . Thanks. -- tejun