vfs: do_last(): check LOOKUP_DIRECTORY
authorMiklos Szeredi <mszeredi@suse.cz>
Mon, 21 May 2012 15:30:11 +0000 (17:30 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 1 Jun 2012 16:11:58 +0000 (12:11 -0400)
commitaf2f55426d1d888dcc0ba8dc9e9deb49fae38e38
tree09a0e9d2b7cc722edf4cd6d1904a98630656a773
parent54c33e7f95284539e52ec2d99dcdf6efd29b247f
vfs: do_last(): check LOOKUP_DIRECTORY

Check for ENOTDIR before finishing open.  This allows this code to be shared
between O_CREAT and plain opens.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c