]> git.baikalelectronics.ru Git - kernel.git/commit
Fix f_flags/f_mode in case of lookup_instantiate_filp() from open(pathname, 3)
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 19 Dec 2009 15:10:39 +0000 (10:10 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 22 Dec 2009 17:27:34 +0000 (12:27 -0500)
commit40b3158a764fbdb17dc40a7d980f6ca78d22d50a
tree6985c64474172ddfb67c737bc4a49e588c49d055
parent43e43a36e8ceef6b0298ee8fa52e86e7a07c0935
Fix f_flags/f_mode in case of lookup_instantiate_filp() from open(pathname, 3)

Just set f_flags when shoving struct file into nameidata; don't
postpone that until __dentry_open().  do_filp_open() has correct
value; lookup_instantiate_filp() doesn't - we lose the difference
between O_RDWR and 3 by that point.

We still set .intent.open.flags, so no fs code needs to be changed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/internal.h
fs/namei.c
fs/open.c
include/linux/namei.h