Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 12 Apr 2001 15:32:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 12 Apr 2001 15:32:24 -0400 Received: from neon-gw.transmeta.com ([209.10.217.66]:3088 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Thu, 12 Apr 2001 15:30:49 -0400 Date: Thu, 12 Apr 2001 12:30:13 -0700 (PDT) From: Linus Torvalds To: Marcelo Tosatti cc: "Stephen C. Tweedie" , Alexander Viro , lkml Subject: Re: generic_osync_inode() broken? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 12 Apr 2001, Marcelo Tosatti wrote: > > Comments? > > --- fs/inode.c~ Thu Mar 22 16:04:13 2001 > +++ fs/inode.c Thu Apr 12 15:18:22 2001 > @@ -347,6 +347,11 @@ > #endif > > spin_lock(&inode_lock); > + while (inode->i_state & I_LOCK) { > + spin_unlock(&inode_lock); > + __wait_on_inode(inode); > + spin_lock(&inode_lock); > + } > if (!(inode->i_state & I_DIRTY)) > goto out; > if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) Ehh. Why not just lock the inode around the thing? The above looks rather ugly. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/