Re: [PATCH] fs: fold open_check_o_direct into do_dentry_open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux