From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030894Ab2CAMmF (ORCPT ); Thu, 1 Mar 2012 07:42:05 -0500 Received: from mga14.intel.com ([143.182.124.37]:6003 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030872Ab2CAMmC (ORCPT ); Thu, 1 Mar 2012 07:42:02 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="113269826" Date: Thu, 1 Mar 2012 20:36:40 +0800 From: Fengguang Wu To: Andrew Morton Cc: Greg Thelen , Jan Kara , Ying Han , "hannes@cmpxchg.org" , KAMEZAWA Hiroyuki , Rik van Riel , Mel Gorman , Minchan Kim , Linux Memory Management List , LKML Subject: Re: [PATCH 5/9] writeback: introduce the pageout work Message-ID: <20120301123640.GA30369@localhost> References: <20120228140022.614718843@intel.com> <20120228144747.198713792@intel.com> <20120228160403.9c9fa4dc.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120228160403.9c9fa4dc.akpm@linux-foundation.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Please have a think about all of this and see if you can demonstrate > how the iput() here is guaranteed safe. There are already several __iget()/iput() calls inside fs-writeback.c. The existing iput() calls already demonstrate its safety? Basically the flusher works in this way - the dirty inode list i_wb_list does not reference count the inode at all - the flusher thread does something analog to igrab() and set I_SYNC before going off to writeout the inode - evice() will wait for completion of I_SYNC Thanks, Fengguang