]> git.baikalelectronics.ru Git - kernel.git/commit
fix a regression in atomic_open()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 8 Jun 2016 01:53:51 +0000 (21:53 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 8 Jun 2016 01:53:51 +0000 (21:53 -0400)
commit06fe94a650edeb9e8ab034e7c0d048bbca4d3490
treecea10fecfae5e081e954861905c25a7f22143444
parent823bddd9b91befecc08381b4e2a0b6c6e6c4c8f4
fix a regression in atomic_open()

open("/foo/no_such_file", O_RDONLY | O_CREAT) on should fail with
EACCES when /foo is not writable; failing with ENOENT is obviously
wrong.  That got broken by a braino introduced when moving the
creat_error logics from atomic_open() to lookup_open().  Easy to
fix, fortunately.

Spotted-by: "Yan, Zheng" <ukernel@gmail.com>
Tested-by: "Yan, Zheng" <ukernel@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c