author: Al Viro <viro@zeniv.linux.org.uk> 2018-07-08 21:45:07 -0400
committer: Al Viro <viro@zeniv.linux.org.uk> 2018-07-10 23:29:03 -0400
commit: 6b4e8085c0004382b985a5c005c685073630e746
parent: b10a4a9f7695335bd2bb19bffdda7fbefbc6581f
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/fs/open.c b/fs/open.c
index 76c56966e297..530da965e369 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -812,6 +812,8 @@ static int do_dentry_open(struct file *f,
return 0;
cleanup_all:
+ if (WARN_ON_ONCE(error > 0))
+ error = -EINVAL;
fops_put(f->f_op);
if (f->f_mode & FMODE_WRITER) {
put_write_access(inode);