summaryrefslogtreecommitdiff
path: root/fs/namei.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-03-20 13:30:14 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2018-03-28 08:39:01 +0300
commitcab64df194667dc5d9d786f0a895f647f5501c0d (patch)
tree7b8466a6eb6ffdf48e91b5c6db85c939a50ac449 /fs/namei.c
parent793057e1c7272a4531aafc130c4d658e4b57422c (diff)
downloadlinux-cab64df194667dc5d9d786f0a895f647f5501c0d.tar.xz
fs: fold open_check_o_direct into do_dentry_open
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. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 5a66e7ca5d60..9cbd5e79ad91 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3382,9 +3382,7 @@ finish_open_created:
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);
out:
@@ -3464,9 +3462,6 @@ static int do_tmpfile(struct nameidata *nd, unsigned flags,
error = finish_open(file, child, NULL, opened);
if (error)
goto out2;
- error = open_check_o_direct(file);
- if (error)
- fput(file);
out2:
mnt_drop_write(path.mnt);
out: