From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Pekka Enberg" Subject: Re: [PATCH+comment] fix tmpfs BUG and AOP_WRITEPAGE_ACTIVATE Date: Thu, 25 Oct 2007 08:37:26 +0300 Message-ID: <84144f020710242237q3aa8e96dtc8cf3f02f2af2cc9@mail.gmail.com> References: <200710142232.l9EMW8kK029572@agora.fsl.cs.sunysb.edu> <84144f020710150447o94b1babo8b6e6a647828465f@mail.gmail.com> <20071024140836.a0098180.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Andrew Morton" , ezk@cs.sunysb.edu, ryan@finnie.org, mhalcrow@us.ibm.com, cjwatson@ubuntu.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, stable@kernel.org To: "Hugh Dickins" Return-path: Received: from rv-out-0910.google.com ([209.85.198.189]:11364 "EHLO rv-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752982AbXJYFh1 (ORCPT ); Thu, 25 Oct 2007 01:37:27 -0400 Received: by rv-out-0910.google.com with SMTP id k20so381244rvb for ; Wed, 24 Oct 2007 22:37:26 -0700 (PDT) In-Reply-To: Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi Hugh, On 10/25/07, Hugh Dickins wrote: > --- 2.6.24-rc1/mm/shmem.c 2007-10-24 07:16:04.000000000 +0100 > +++ linux/mm/shmem.c 2007-10-24 22:31:09.000000000 +0100 > @@ -915,6 +915,21 @@ static int shmem_writepage(struct page * > struct inode *inode; > > BUG_ON(!PageLocked(page)); > + /* > + * shmem_backing_dev_info's capabilities prevent regular writeback or > + * sync from ever calling shmem_writepage; but a stacking filesystem > + * may use the ->writepage of its underlying filesystem, in which case I find the above bit somewhat misleading as it implies that the !wbc->for_reclaim case can be removed after ecryptfs has similar fix as unionfs. Can we just say that while BDI_CAP_NO_WRITEBACK does prevent some callers from entering ->writepage(), it's just an optimization and ->writepage() must deal with !wbc->for_reclaim case properly? Pekka