From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: [patch 3/5] tmpfs: convert to use the new truncate convention Date: Thu, 10 Dec 2009 11:48:52 +1100 Message-ID: <20091210004852.GA9601@nick> References: <20091208083832.GA19823@wotan.suse.de> <20091208084109.GC19823@wotan.suse.de> <20091209144559.GC7044@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Al Viro , Christoph Hellwig , linux-fsdevel@vger.kernel.org To: Jan Kara Return-path: Received: from cantor2.suse.de ([195.135.220.15]:52515 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759375AbZLJBus (ORCPT ); Wed, 9 Dec 2009 20:50:48 -0500 Content-Disposition: inline In-Reply-To: <20091209144559.GC7044@quack.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Dec 09, 2009 at 03:45:59PM +0100, Jan Kara wrote: > On Tue 08-12-09 09:41:09, Nick Piggin wrote: > > Cc: Christoph Hellwig > > Acked-by: Hugh Dickins > > Signed-off-by: Nick Piggin > ... > > @@ -821,11 +824,11 @@ static void shmem_delete_inode(struct in > > { > > struct shmem_inode_info *info = SHMEM_I(inode); > > > > - if (inode->i_op->truncate == shmem_truncate) { > > + if (inode->i_mapping->a_ops == &shmem_aops) { > How about symlinks here? Originally we've truncated inode for them as > well... BTW the check is really strange. Shouldn't we rather make it > something like S_ISLNK || S_ISREG? Yes you're right. I don't see why we can't use the mode check, Hugh?