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