From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762185Ab0J3ADa (ORCPT ); Fri, 29 Oct 2010 20:03:30 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:56107 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751345Ab0J3AD2 (ORCPT ); Fri, 29 Oct 2010 20:03:28 -0400 Date: Fri, 29 Oct 2010 17:02:09 -0700 From: Andrew Morton To: Ken Sumrall Cc: linux-kernel@vger.kernel.org, Miklos Szeredi , Jens Axboe , Anfei , "Anand V. Avati" , fuse-devel@lists.sourceforge.net Subject: Re: [PATCH] Fix bug in FUSE where the attribute cache for a file was not cleared when a file is opened with O_TRUNC. Message-Id: <20101029170209.0aced0ca.akpm@linux-foundation.org> In-Reply-To: <1288395700-9527-1-git-send-email-ksumrall@android.com> References: <1288395700-9527-1-git-send-email-ksumrall@android.com> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Oct 2010 16:41:40 -0700 Ken Sumrall wrote: > Signed-off-by: Ken Sumrall > --- > fs/fuse/file.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/fs/fuse/file.c b/fs/fuse/file.c > index c822458..4fbe62c 100644 > --- a/fs/fuse/file.c > +++ b/fs/fuse/file.c > @@ -134,6 +134,7 @@ EXPORT_SYMBOL_GPL(fuse_do_open); > void fuse_finish_open(struct inode *inode, struct file *file) > { > struct fuse_file *ff = file->private_data; > + struct fuse_conn *fc = get_fuse_conn(inode); > > if (ff->open_flags & FOPEN_DIRECT_IO) > file->f_op = &fuse_direct_io_file_operations; > @@ -141,6 +142,8 @@ void fuse_finish_open(struct inode *inode, struct file *file) > invalidate_inode_pages2(inode->i_mapping); > if (ff->open_flags & FOPEN_NONSEEKABLE) > nonseekable_open(inode, file); > + if (fc->atomic_o_trunc && (file->f_flags & O_TRUNC)) > + fuse_invalidate_attr(inode); > } > > int fuse_open_common(struct inode *inode, struct file *file, bool isdir) What were the user-visible effects of this bug?