public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Ken Sumrall <ksumrall@android.com>
Cc: linux-kernel@vger.kernel.org, Miklos Szeredi <miklos@szeredi.hu>,
	Jens Axboe <jens.axboe@oracle.com>, Anfei <anfei.zhou@gmail.com>,
	"Anand V. Avati" <avati@gluster.com>,
	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.
Date: Fri, 29 Oct 2010 17:02:09 -0700	[thread overview]
Message-ID: <20101029170209.0aced0ca.akpm@linux-foundation.org> (raw)
In-Reply-To: <1288395700-9527-1-git-send-email-ksumrall@android.com>

On Fri, 29 Oct 2010 16:41:40 -0700 Ken Sumrall <ksumrall@android.com> wrote:

> Signed-off-by: Ken Sumrall <ksumrall@android.com>
> ---
>  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?


  reply	other threads:[~2010-10-30  0:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 23:41 [PATCH] Fix bug in FUSE where the attribute cache for a file was not cleared when a file is opened with O_TRUNC Ken Sumrall
2010-10-30  0:02 ` Andrew Morton [this message]
     [not found]   ` <AANLkTimJWX5WnG6oiUfBxiD=BBJ=Q5iRc73iar=gPKCy@mail.gmail.com>
2010-10-30  0:37     ` Fwd: " Ken Sumrall
2010-10-30 11:31     ` Miklos Szeredi
2010-11-01 23:38       ` Ken Sumrall
2010-11-11 22:10       ` Andrew Morton
2010-11-12  9:37         ` Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101029170209.0aced0ca.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=anfei.zhou@gmail.com \
    --cc=avati@gluster.com \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=jens.axboe@oracle.com \
    --cc=ksumrall@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox