From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 5 Dec 2000 19:30:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 5 Dec 2000 19:30:44 -0500 Received: from zeus.kernel.org ([209.10.41.242]:41988 "EHLO zeus.kernel.org") by vger.kernel.org with ESMTP id ; Tue, 5 Dec 2000 19:30:39 -0500 Date: Tue, 5 Dec 2000 23:15:04 +0000 From: "Stephen C. Tweedie" To: Alexander Viro Cc: Linus Torvalds , "Stephen C. Tweedie" , Kernel Mailing List , Alexander Viro , Andrew Morton , Alan Cox , Christoph Rohland , Rik van Riel , MOLNAR Ingo Subject: Re: test12-pre5 Message-ID: <20001205231504.I10663@redhat.com> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; from viro@math.psu.edu on Tue, Dec 05, 2000 at 03:17:07PM -0500 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Dec 05, 2000 at 03:17:07PM -0500, Alexander Viro wrote: > > > On Tue, 5 Dec 2000, Linus Torvalds wrote: > > > And this is not just a "it happens to be like this" kind of thing. It > > _has_ to be like this, because every time we call clear_inode() we are > > going to physically free the memory associated with the inode very soon > > afterwards. Which means that _any_ use of the inode had better be long > > gone. Dirty buffers included. > > Urgh. Linus, AFAICS we _all_ agree on that. The only real question is > whether we consider calling clear_inode() with droppable dirty buffers > to be OK. It can't happen on the dispose_list() path and I'ld rather > see it _not_ happening on the delete_inode() one. It's a policy question, > not the correctness one. Right, because if we get this wrong, the kernel won't complain, but we'll have a rare, impossible-to-diagnose potential data corrupter for any applications which do recovery on reboot. If we're not going to change the code, then at the very least a huge warning comment above clear_inode() is necessary to make it explicit that you shouldn't ever pass in an inode with dirty buffers unless nlink==0, and I'd rather see the BUG there instead. --Stephen - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/