linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] fuse: check O_DIRECT
Date: Fri, 23 Sep 2005 14:27:58 -0700	[thread overview]
Message-ID: <20050923142758.641189f2.akpm@osdl.org> (raw)
In-Reply-To: <E1EIoQZ-0006Rz-00@dorka.pomaz.szeredi.hu>

Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> Check O_DIRECT and return -EINVAL error in open.  dentry_open() also
> checks this but only after the open method is called.  This patch
> optimizes away the unnecessary upcalls in this case.
> 
> Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
> 
> Index: linux/fs/fuse/file.c
> ===================================================================
> --- linux.orig/fs/fuse/file.c	2005-09-21 11:55:45.000000000 +0200
> +++ linux/fs/fuse/file.c	2005-09-23 15:24:23.000000000 +0200
> @@ -23,6 +23,10 @@ int fuse_open_common(struct inode *inode
>  	struct fuse_file *ff;
>  	int err;
>  
> +	/* VFS checks this, but only _after_ ->open() */
> +	if (file->f_flags & O_DIRECT)
> +		return -EINVAL;
> +
>  	err = generic_file_open(inode, file);
>  	if (err)
>  		return err;

This hardly seems worth optimising for?

  reply	other threads:[~2005-09-23 21:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-23 14:21 [PATCH 3/3] fuse: check O_DIRECT Miklos Szeredi
2005-09-23 21:27 ` Andrew Morton [this message]
2005-09-24  5:56   ` 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=20050923142758.641189f2.akpm@osdl.org \
    --to=akpm@osdl.org \
    --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;
as well as URLs for NNTP newsgroup(s).