Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Al Viro Newsgroups: linux.kernel Subject: Re: [PATCH] vfs: check i_count under lock in evict_inodes Date: Tue, 12 Jul 2016 07:30:01 +0200 Message-ID: References: X-Original-To: David Chen MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 11 Organization: linux.* mail to news gateway X-Original-Cc: lkml , linux-fsdevel@vger.kernel.org, stable@vger.kernel.org X-Original-Date: Tue, 12 Jul 2016 06:26:24 +0100 X-Original-Message-ID: <20160712052624.GC14480@ZenIV.linux.org.uk> X-Original-References: <1468282504-2272-1-git-send-email-david.chen@osnexus.com> <20160712004623.GA14480@ZenIV.linux.org.uk> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1441070 On Mon, Jul 11, 2016 at 06:31:57PM -0700, David Chen wrote: > Hi Al, > > I'm not sure about the in-tree fs, but in zfsonlinux, it would offload > iput to a thread, so this would happen there. And it would wait for > the thread in put_super(), so that part is not a problem... *shrug* I hadn't looked (and won't look) at zfs glue, but I'd suggest trying something along the line of stopping that thread in the beginning of your ->kill_sb() (having told the sucker to stop offloading, of course) and only then calling generic_shutdown_super()...