linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. R. Okajima" <hooanon05g@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs: fold open_check_o_direct into do_dentry_open
Date: Thu, 26 Apr 2018 00:03:34 +0900	[thread overview]
Message-ID: <6741.1524668614@jrobl> (raw)
In-Reply-To: <20180320103014.23242-1-hch@lst.de>

Christoph Hellwig:
> do_dentry_open is where we do the actual open of the file, so this is
> where we should do our O_DIRECT sanity check to cover all potential
> callers.
	:::
> diff --git a/fs/namei.c b/fs/namei.c
> index 920a828ab2ce..9d6d8e8aed55 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -3374,9 +3374,7 @@ static int do_last(struct nameidata *nd,
>  		goto out;
>  	*opened |= FILE_OPENED;
>  opened:
> -	error = open_check_o_direct(file);
> -	if (!error)
> -		error = ima_file_check(file, op->acc_mode, *opened);
> +	error = ima_file_check(file, op->acc_mode, *opened);
>  	if (!error && will_truncate)
>  		error = handle_truncate(file);

Removing the check from here may cause a problem I am afraid.
In open(O_ATOMIC|O_DIRECT) case, the check is totally gone, isn't it?


J. R. Okajima

  reply	other threads:[~2018-04-25 15:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20 10:30 [PATCH] fs: fold open_check_o_direct into do_dentry_open Christoph Hellwig
2018-04-25 15:03 ` J. R. Okajima [this message]
2018-04-26  7:19   ` Christoph Hellwig
2018-04-26 15:50     ` J. R. Okajima

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=6741.1524668614@jrobl \
    --to=hooanon05g@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).